Sample - Asana API
PUT/tasks/{task_gid}

Update a task

Updates an existing task with the fields supplied in the request. Use the data block to change only the properties you intend to modify, because omitted fields remain unchanged and sending stale values can overwrite another user's changes. The response contains the complete updated task record.

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

1 parameter · 1 body field
opt_fieldsarray<string>optional
A comma-separated list of task properties to include in the response, including nested properties; available values include `actual_time_minutes`, `approval_status`, `assigned_by`, `assigned_by.name`, `assignee`, and `assignee.name`, among others.

The task fields to update, provided in the data object. Only supplied fields are changed.

dataobjectoptional
The task properties to update.

6 status codes
200Returns the complete updated task record.
dataobjectoptional
400Returned when a parameter is missing or malformed.
errorsarray<object>optional
401Returned when a valid authentication token was not provided.
errorsarray<object>optional
403Returned when the authenticated user does not have access to the task or requested properties.
errorsarray<object>optional
404Returned when the request does not specify a known action or the specified task does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the task from being updated.
errorsarray<object>optional

Error handling

A 400 is returned when a parameter is missing or malformed. 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 task or requested properties. A 404 indicates that the task does not exist or that the request path is not a known action; a 500 indicates a server-side failure. The request also requires the tasks:write scope.