Search + K

Command Palette

Search for a command to run...

Sign In

Add users to a project

POST /projects/{project_gid}/addMembers
Copy endpoint
https://app.asana.com/api/1.0

Adds the specified list of users as members of the project. Note that a user being added as a member may also be added as a follower as a result of this operation. This is because the user's default notification settings (i.e., in the "Notifications" tab of "My Profile Settings") will override this endpoint's default behavior of setting "Tasks added" notifications to false. Returns the updated project record.

Parameters

path Path Parameters

Name Type
project_gid required

Globally unique identifier for the project.

string

query Query Parameters

Name Type
opt_fields

This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.

("archived" | "color" | "completed" | "completed_at" | "completed_by" | "completed_by.name" | "created_at" | "created_from_template" | "created_from_template.name" | "current_status" | "current_status.author" | "current_status.author.name" | "current_status.color" | "current_status.created_at" | "current_status.created_by" | "current_status.created_by.name" | "current_status.html_text" | "current_status.modified_at" | "current_status.text" | "current_status.title" | "current_status_update" | "current_status_update.resource_subtype" | "current_status_update.title" | "custom_field_settings" | "custom_field_settings.custom_field" | "custom_field_settings.custom_field.asana_created_field" | "custom_field_settings.custom_field.created_by" | "custom_field_settings.custom_field.created_by.name" | "custom_field_settings.custom_field.currency_code" | "custom_field_settings.custom_field.custom_label" | "custom_field_settings.custom_field.custom_label_position" | "custom_field_settings.custom_field.date_value" | "custom_field_settings.custom_field.date_value.date" | "custom_field_settings.custom_field.date_value.date_time" | "custom_field_settings.custom_field.default_access_level" | "custom_field_settings.custom_field.description" | "custom_field_settings.custom_field.display_value" | "custom_field_settings.custom_field.enabled" | "custom_field_settings.custom_field.enum_options" | "custom_field_settings.custom_field.enum_options.color" | "custom_field_settings.custom_field.enum_options.enabled" | "custom_field_settings.custom_field.enum_options.name" | "custom_field_settings.custom_field.enum_value" | "custom_field_settings.custom_field.enum_value.color" | "custom_field_settings.custom_field.enum_value.enabled" | "custom_field_settings.custom_field.enum_value.name" | "custom_field_settings.custom_field.format" | "custom_field_settings.custom_field.has_notifications_enabled" | "custom_field_settings.custom_field.id_prefix" | "custom_field_settings.custom_field.input_restrictions" | "custom_field_settings.custom_field.is_formula_field" | "custom_field_settings.custom_field.is_global_to_workspace" | "custom_field_settings.custom_field.is_value_read_only" | "custom_field_settings.custom_field.multi_enum_values" | "custom_field_settings.custom_field.multi_enum_values.color" | "custom_field_settings.custom_field.multi_enum_values.enabled" | "custom_field_settings.custom_field.multi_enum_values.name" | "custom_field_settings.custom_field.name" | "custom_field_settings.custom_field.number_value" | "custom_field_settings.custom_field.people_value" | "custom_field_settings.custom_field.people_value.name" | "custom_field_settings.custom_field.precision" | "custom_field_settings.custom_field.privacy_setting" | "custom_field_settings.custom_field.reference_value" | "custom_field_settings.custom_field.reference_value.name" | "custom_field_settings.custom_field.representation_type" | "custom_field_settings.custom_field.resource_subtype" | "custom_field_settings.custom_field.text_value" | "custom_field_settings.custom_field.type" | "custom_field_settings.is_important" | "custom_field_settings.parent" | "custom_field_settings.parent.name" | "custom_field_settings.project" | "custom_field_settings.project.name" | "custom_fields" | "custom_fields.date_value" | "custom_fields.date_value.date" | "custom_fields.date_value.date_time" | "custom_fields.display_value" | "custom_fields.enabled" | "custom_fields.enum_options" | "custom_fields.enum_options.color" | "custom_fields.enum_options.enabled" | "custom_fields.enum_options.name" | "custom_fields.enum_value" | "custom_fields.enum_value.color" | "custom_fields.enum_value.enabled" | "custom_fields.enum_value.name" | "custom_fields.id_prefix" | "custom_fields.input_restrictions" | "custom_fields.is_formula_field" | "custom_fields.multi_enum_values" | "custom_fields.multi_enum_values.color" | "custom_fields.multi_enum_values.enabled" | "custom_fields.multi_enum_values.name" | "custom_fields.name" | "custom_fields.number_value" | "custom_fields.representation_type" | "custom_fields.text_value" | "custom_fields.type" | "default_access_level" | "default_view" | "due_date" | "due_on" | "followers" | "followers.name" | "html_notes" | "icon" | "members" | "members.name" | "minimum_access_level_for_customization" | "minimum_access_level_for_sharing" | "modified_at" | "name" | "notes" | "owner" | "permalink_url" | "privacy_setting" | "project_brief" | "public" | "start_on" | "team" | "team.name" | "workspace" | "workspace.name")[]
opt_pretty

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.

boolean

Request Body

application/json required

Information about the members being added.

{ data?: AddMembersRequest
interface AddMembersRequest {
members: string;
}
; }

Responses

200 application/json

Successfully added members to the project.

{ data?: ProjectResponse
type ProjectResponse = ProjectBase & {
custom_fields?: readonly CustomFieldCompact[];
completed?: boolean;
completed_at?: string | null;
completed_by?: UserCompact & null;
followers?: readonly UserCompact[];
owner?: {} & UserCompact | null & UserCompact;
team?: TeamCompact & {};
permalink_url?: string;
project_brief?: {} & ProjectBriefCompact | null & ProjectBriefCompact;
created_from_template?: {} & ProjectTemplateCompact | null & ProjectTemplateCompact;
workspace?: WorkspaceCompact & {};
}
; }

Client Errors

400 application/json

This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}
401 application/json

A valid authentication token was not provided with the request, so the API could not associate a user with the request.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}
403 application/json

The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}
404 application/json

Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}

Server Errors

500 application/json

There was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}