Sample - Asana API
PUT/workspaces/{workspace_gid}/users/{user_gid}

Update a user in a workspace

Updates an existing user in a workspace or organization. Supply only the user properties you want to change in the data block; unspecified properties remain unchanged. Use opt_fields to request optional fields in the updated user response.

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

1 parameter · 1 body field
opt_fieldsarray<string>optional
Comma-separated optional user properties to include in the response, including nested custom-field properties such as `custom_fields.date_value` and `custom_fields.enum_value`.

User properties to update; provide the fields to change in the data object.

dataobjectoptional
The user properties to update, including supported user attributes and `custom_fields`; properties omitted from this object remain unchanged.

6 status codes
200Returns the successfully updated user resource.
dataobjectoptional
400Returned when a parameter is missing or malformed, or the request syntax is invalid.
errorsarray<object>optional
401Returned when a valid authentication token is not provided.
errorsarray<object>optional
403Returned when the request is valid but the authenticated user cannot access or update the specified user or workspace.
errorsarray<object>optional
404Returned when the request path is not recognized or the specified user or workspace does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the update; the response may include an error phrase.
errorsarray<object>optional

Error handling

A 400 is returned when the request is missing or malformed, including invalid data or opt_fields syntax. A 401 is returned without a valid authentication token, and a 403 is returned when the authenticated user cannot update the user or workspace. A 404 is returned when the user or workspace does not exist, while a 500 indicates a server-side failure.