Asana API

Getting access, Developing, Testing

Back to Asana

Update A Membership

An existing membership can be updated by making a PUT request on the URL for that goal. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged. Memberships on project, portfolio, team, and goals can be updated.

Input

type: object properties: parameters: type: object properties: membership_gid: type: string description: Globally unique identifier for the membership. opt_pretty: type: boolean description: >- Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. opt_fields: type: array items: type: string description: >- Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. required: - membership_gid title: Parameters data: type: object properties: data: type: object properties: is_active: description: >- *Optional*. Denotes if a member is active. Applies to all memberships type: boolean example: true is_guest: description: >- *Optional*. Denotes if a member is a guest. Applies to only `team` memberships. type: boolean example: true is_admin: description: >- *Optional*. Denotes if a member is an admin. Applies to only `team` memberships. type: boolean example: false title: Data

Output

type: object properties: data: type: object properties: gid: type: string resource_type: type: string user: type: object properties: gid: type: string resource_type: type: string name: type: string project: description: >- [Opt In](/docs/inputoutput-options). The project the user is a member of. type: object x-docs-overrides: properties.resource_type.example: project properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: >- Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. type: string example: Stuff to buy member: type: object properties: gid: type: string resource_type: type: string name: type: string write_access: description: >- Whether the member has full access, edit access, or comment-only access to the project. type: string enum: - full_write - editor - comment_only readOnly: true example: full_write portfolio: description: >- [Opt In](/docs/inputoutput-options). The portfolio the user is a member of. type: object x-docs-overrides: properties.resource_type.example: portfolio properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the portfolio. type: string example: Bug Portfolio team: description: A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: team properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the team. type: string example: Marketing is_guest: type: boolean is_limited_access: type: boolean description: Describes if the user has limited access to the team. example: false is_admin: type: boolean goal: description: A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: goal properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: The name of the goal. example: Grow web traffic by 30% owner: description: A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: user nullable: true properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: >- *Read-only except when same user as requester*. The user’s name. example: Greg Sanchez is_commenter: type: boolean description: Describes if the member is comment only in goal. example: false is_editor: type: boolean description: Describes if the member is editor in goal. example: false workspace: description: A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: workspace properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the workspace. type: string example: My Company Workspace user_task_list: description: The user's "My Tasks" in the workspace. readOnly: true type: object x-docs-overrides: properties.resource_type.example: user_task_list properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the user task list. type: string example: My Tasks in My Workspace owner: description: >- The owner of the user task list, i.e. the person whose My Tasks is represented by this resource. readOnly: true type: object x-docs-overrides: properties.resource_type.example: user properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: >- *Read-only except when same user as requester*. The user’s name. example: Greg Sanchez workspace: description: The workspace in which the user task list is located. readOnly: true type: object x-docs-overrides: properties.resource_type.example: workspace properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the workspace. type: string example: My Company Workspace is_active: type: boolean readOnly: true description: Reflects if this user still a member of the workspace. vacation_dates: type: object readOnly: true nullable: true description: >- Contains keys `start_on` and `end_on` for the vacation dates for the user in this workspace. If `start_on` is null, the entire `vacation_dates` object will be null. If `end_on` is before today, the entire `vacation_dates` object will be null. properties: start_on: description: >- The day on which the user's vacation in this workspace starts. This is a date with `YYYY-MM-DD` format. type: string example: '2022-11-05T00:00:00.000Z' end_on: description: >- The day on which the user's vacation in this workspace ends, or null if there is no end date. This is a date with `YYYY-MM-DD` format. nullable: true type: string example: '2022-11-07T00:00:00.000Z' created_at: description: The time at which this resource was created. type: string format: date-time readOnly: true example: '2012-02-22T02:06:58.147Z'