Update a task
PUT
/tasks/{task_gid}
Tasks
URL for that task. Only the fields provided in the
data
block will beupdated; any unspecified fields will remain unchanged.
to change, or else you may overwrite changes made by another user since
you last retrieved the task.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://app.asana.com/api/1.0/tasks/' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"name": "Buy catnip",
"approval_status": "pending",
"assignee_status": "upcoming",
"completed": false,
"completed_by": {
"name": "Greg Sanchez"
},
"due_at": "2019-09-15T02:06:58.147Z",
"due_on": "2019-09-15",
"external": {
"data": "A blob of information",
"gid": "my_gid"
},
"html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
"liked": true,
"notes": "Mittens really likes the stuff from Humboldt.",
"resource_subtype": "default_task",
"start_on": "2019-09-14",
"assignee": "12345",
"assignee_section": "12345",
"custom_fields": {
"4578152156": "Not Started",
"5678904321": "On Hold"
},
"followers": [
"12345"
],
"parent": "12345",
"projects": [
"12345"
],
"tags": [
"12345"
],
"workspace": "12345"
}
}'
Response Response Example
200 - Example 1
{
"data": {
"gid": "12345",
"resource_type": "task",
"name": "Buy catnip",
"approval_status": "pending",
"assignee_status": "upcoming",
"completed": false,
"completed_at": "2012-02-22T02:06:58.147Z",
"completed_by": {
"gid": "12345",
"resource_type": "task",
"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": {
"data": "A blob of information",
"gid": "my_gid"
},
"hearted": true,
"hearts": [
{
"gid": "12345",
"user": {
"gid": "12345",
"resource_type": "task",
"name": "Greg Sanchez"
}
}
],
"html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
"is_rendered_as_separator": false,
"liked": true,
"likes": [
{
"gid": "12345",
"user": {
"gid": "12345",
"resource_type": "task",
"name": "Greg Sanchez"
}
}
],
"memberships": [
{
"project": {
"gid": "12345",
"resource_type": "task",
"name": "Stuff to buy"
},
"section": {
"gid": "12345",
"resource_type": "task",
"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,
"resource_subtype": "default_task",
"start_on": "2019-09-14",
"assignee": {
"gid": "12345",
"resource_type": "task",
"name": "Greg Sanchez"
},
"assignee_section": {
"gid": "12345",
"resource_type": "task",
"name": "Next Actions"
},
"custom_fields": [
{
"gid": "12345",
"resource_type": "task",
"display_value": "blue",
"enabled": true,
"enum_options": [
{
"gid": "12345",
"resource_type": "task",
"color": "blue",
"enabled": true,
"name": "Low"
}
],
"name": "Status",
"number_value": 5.2,
"resource_subtype": "text",
"text_value": "Some Value",
"type": "text",
"currency_code": "EUR",
"custom_label": "gold pieces",
"custom_label_position": "suffix",
"description": "Development team priority",
"format": "custom",
"has_notifications_enabled": true,
"is_global_to_workspace": true,
"precision": 2,
"created_by": {
"gid": "12345",
"resource_type": "task",
"name": "Greg Sanchez"
},
"enum_value": {
"gid": "12345",
"resource_type": "task",
"color": "blue",
"enabled": true,
"name": "Low"
},
"multi_enum_values": [
{
"gid": "12345",
"resource_type": "task",
"color": "blue",
"enabled": true,
"name": "Low"
}
]
}
],
"followers": [
{
"gid": "12345",
"resource_type": "task",
"name": "Greg Sanchez"
}
],
"parent": {
"gid": "12345",
"resource_type": "task",
"name": "Bug Task"
},
"permalink_url": "https://app.asana.com/0/resource/123456789/list",
"projects": [
{
"gid": "12345",
"resource_type": "task",
"name": "Stuff to buy"
}
],
"tags": [
{
"gid": "59746",
"name": "Grade A"
}
],
"workspace": {
"gid": "12345",
"resource_type": "task",
"name": "My Company Workspace"
}
}
}
Request
Path Params
task_gid
string
required
Body Params application/json
Responses
Modified at 2022-09-13 02:00:32