Users
Update a user
Changed onA specific, existing user can be updated by making a PUT request on the URL for that user. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.
Returns the complete updated user record.
put/users/{user_gid}
Request
- Base URL: https://app.asana.com/api/1.0
- URL: https://app.asana.com/api/1.0/users/{user_gid}
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://app.asana.com/-/oauth_authorize, token URL https://app.asana.com/-/oauth_token)
Query parameters
opt_fieldsstring[]
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. Properties can include nested fields. To learn more, see the input/output options guide.
Request body
Example request
{
"data": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez",
"custom_fields": {
"5678904321": "On Hold",
"4578152156": "Not Started"
},
"html_custom_fields": {
"5678904321": "<body><strong>Bold text</strong></body>",
"4578152156": "<body><code>Code block</code></body>"
}
}
}Response
Successfully updated the specified user.
Example response
{
"data": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez",
"email": "gsanchez@example.com",
"photo": {
"image_21x21": "https://...",
"image_27x27": "https://...",
"image_36x36": "https://...",
"image_60x60": "https://...",
"image_128x128": "https://...",
"image_1024x1024": "https://..."
},
"workspaces": [
{
"gid": "12345",
"resource_type": "workspace",
"name": "My Company Workspace"
}
],
"custom_fields": [
{
"gid": "12345",
"resource_type": "custom_field",
"name": "Status",
"enum_options": [
{
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
}
],
"enabled": true,
"representation_type": "number",
"id_prefix": "ID",
"input_restrictions": [
"task"
],
"date_value": {
"date": "2024-08-23",
"date_time": "2024-08-23T22:00:00.000Z"
},
"enum_value": {
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
},
"multi_enum_values": [
{
"gid": "12345",
"resource_type": "enum_option",
"name": "Low",
"enabled": true,
"color": "blue"
}
],
"number_value": 5.2,
"text_value": "Some Value",
"display_value": "blue"
}
]
}
}Changes
- info
added the new optional request property
//
- info
- warning
removed the request property
//
- warning