Update a task
<b>Required scope: </b><code>tasks:write</code>
A specific, existing task can be updated by making a PUT request on the URL for that task. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.
When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task.
Returns the complete updated task record.
Request
- Base URL: https://app.asana.com/api/1.0
- URL: https://app.asana.com/api/1.0/tasks/{task_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, scopes: tasks:write)
Query parameters
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": "task",
"name": "Buy catnip",
"resource_subtype": "default_task",
"created_by": {
"gid": "1111",
"resource_type": "user"
},
"approval_status": "pending",
"assignee_status": "upcoming",
"assigned_by": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
},
"completed_at": "2012-02-22T02:06:58.147Z",
"completed_by": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
},
"created_at": "2012-02-22T02:06:58.147Z",
"dependencies": [
{
"gid": "12345",
"resource_type": "task"
}
],
"dependents": [
{
"gid": "12345",
"resource_type": "task"
}
],
"due_at": "2019-09-15T02:06:58.147Z",
"due_on": "2019-09-15",
"external": {
"gid": "my_gid",
"data": "A blob of information"
},
"html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
"hearted": true,
"hearts": [
{
"gid": "12345",
"user": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
}
],
"has_subtasks_date_mismatch": true,
"liked": true,
"likes": [
{
"gid": "12345",
"user": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
}
],
"memberships": [
{
"project": {
"gid": "12345",
"resource_type": "project",
"name": "Stuff to buy",
"resource_subtype": "default_project"
},
"section": {
"gid": "12345",
"resource_type": "section",
"name": "Next Actions"
}
}
],
"modified_at": "2012-02-22T02:06:58.147Z",
"notes": "Mittens really likes the stuff from Humboldt.",
"num_hearts": 5,
"num_likes": 5,
"num_subtasks": 3,
"start_at": "2019-09-14T02:06:58.147Z",
"start_on": "2019-09-14",
"actual_time_minutes": 200,
"assignee": "12345",
"assignee_section": "12345",
"custom_fields": {
"5678904321": "On Hold",
"4578152156": "Not Started"
},
"custom_type": "12345",
"custom_type_status_option": "12345",
"html_custom_fields": {
"5678904321": "<body><strong>Bold text</strong></body>",
"4578152156": "<body><code>Code block</code></body>"
},
"parent": "12345"
}
}Response
Successfully updated the specified task.
Example response
{
"data": {
"gid": "12345",
"resource_type": "task",
"name": "Buy catnip",
"resource_subtype": "default_task",
"created_by": {
"gid": "1111",
"resource_type": "user"
},
"approval_status": "pending",
"assignee_status": "upcoming",
"assigned_by": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
},
"completed_at": "2012-02-22T02:06:58.147Z",
"completed_by": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
},
"created_at": "2012-02-22T02:06:58.147Z",
"dependencies": [
{
"gid": "12345",
"resource_type": "task"
}
],
"dependents": [
{
"gid": "12345",
"resource_type": "task"
}
],
"due_at": "2019-09-15T02:06:58.147Z",
"due_on": "2019-09-15",
"external": {
"gid": "my_gid",
"data": "A blob of information"
},
"html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
"hearted": true,
"hearts": [
{
"gid": "12345",
"user": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
}
],
"has_subtasks_date_mismatch": true,
"liked": true,
"likes": [
{
"gid": "12345",
"user": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
}
],
"memberships": [
{
"project": {
"gid": "12345",
"resource_type": "project",
"name": "Stuff to buy",
"resource_subtype": "default_project"
},
"section": {
"gid": "12345",
"resource_type": "section",
"name": "Next Actions"
}
}
],
"modified_at": "2012-02-22T02:06:58.147Z",
"notes": "Mittens really likes the stuff from Humboldt.",
"num_hearts": 5,
"num_likes": 5,
"num_subtasks": 3,
"start_at": "2019-09-14T02:06:58.147Z",
"start_on": "2019-09-14",
"actual_time_minutes": 200,
"assignee": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
},
"assignee_section": {
"gid": "12345",
"resource_type": "section",
"name": "Next Actions"
},
"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",
"description": "Development team priority",
"precision": 2,
"format": "custom",
"currency_code": "EUR",
"custom_label": "gold pieces",
"custom_label_position": "suffix",
"is_global_to_workspace": true,
"has_notifications_enabled": true,
"asana_created_field": "priority",
"created_by": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
},
"people_value": [
{
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
],
"reference_value": [
{
"gid": "12345",
"resource_type": "task",
"name": "Bug Task"
}
],
"html_text_value": "<body>Some Value</body>",
"privacy_setting": "public_with_guests",
"default_access_level": "user",
"resource_subtype": "text"
}
],
"custom_type": {
"gid": "12345",
"resource_type": "custom_type",
"name": "Bug ticket",
"asana_created_type_identifier": "COMMAND_TICKET"
},
"custom_type_status_option": {
"gid": "12345",
"resource_type": "custom_type_status_option",
"name": "Solution pending"
},
"followers": [
{
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
],
"parent": {
"gid": "12345",
"resource_type": "task",
"name": "Bug Task",
"resource_subtype": "default_task",
"created_by": {
"gid": "1111",
"resource_type": "user"
}
},
"projects": [
{
"gid": "12345",
"resource_type": "project",
"name": "Stuff to buy",
"resource_subtype": "default_project"
}
],
"effective_memberships": [
{
"project": {
"gid": "12345",
"resource_type": "project",
"name": "Stuff to buy",
"resource_subtype": "default_project"
},
"section": {
"gid": "12345",
"resource_type": "section",
"name": "Next Actions"
}
}
],
"tags": [
{
"gid": "59746",
"name": "Grade A"
}
],
"workspace": {
"gid": "12345",
"resource_type": "workspace",
"name": "My Company Workspace"
},
"permalink_url": "https://app.asana.com/1/12345/task/123456789"
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.