Sample - Asana API
POST/memberships

Create a membership

Creates a new membership connecting a Team or User to a goal, project, portfolio, custom type, or custom field. Supply the membership details in the data object, including the member, parent, role, and access level when applicable. A 201 response returns the complete newly created membership record.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 body field

Membership details for associating a Team or User with a goal, project, portfolio, custom type, or custom field.

dataobjectoptional
The membership data, including its access level, member, parent object, and role.

6 status codes
201Returns the complete newly created membership record.
dataobjectoptional
400Returned when the request is missing or contains a malformed parameter or body value.
errorsarray<object>optional
401Returned when a valid authentication token is not provided.
errorsarray<object>optional
403Returned when the authenticated user does not have access to the requested objects or properties.
errorsarray<object>optional
404Returned when the request method or path is unknown, or a referenced object does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the membership from being created.
errorsarray<object>optional

Error handling

A 400 is returned when the request is missing required information or contains malformed syntax. A 401 is returned when you do not provide a valid authentication token, and a 403 is returned when the authenticated user lacks access to the specified objects or properties. A 404 is returned when the method, path, or referenced object is not found; a 500 is returned for a server-side failure.