Asana
  1. Tasks
Asana
  • Attachments
    • Delete an attachment
      DELETE
    • Get an attachment
      GET
    • Get attachments for a task
      GET
    • Upload an attachment
      POST
  • Batch API
    • Submit parallel requests
  • Custom Fields
    • Create a custom field
    • Delete a custom field
    • Get a custom field
    • Update a custom field
    • Create an enum option
    • Reorder a custom field's enum
    • Update an enum option
    • Get a workspace's custom fields
  • Events
    • Get events on a resource
  • Goals
    • Get goals
    • Create a goal
    • Delete a goal
    • Get a goal
    • Update a goal
    • Add a collaborator to a goal
    • Add a subgoal to a parent goal
    • Add a project/portfolio as supporting work for a goal.
    • Get parent goals from a goal
    • Remove a collaborator from a goal
    • Remove a subgoal from a goal
    • Remove a project/portfolio as supporting work for a goal.
    • Create a goal metric
    • Update a goal metric
    • Get subgoals from a goal
    • Get supporting work from a goal
  • Jobs
    • Get a job by id
  • Organization Exports
    • Create an organization export request
    • Get details on an org export request
  • Teams
    • Get teams in an organization
    • Create a team
    • Get a team
    • Add a user to a team
    • Remove a user from a team
    • Get teams for a user
  • Portfolio Memberships
    • Get multiple portfolio memberships
    • Get a portfolio membership
    • Get memberships from a portfolio
  • Portfolios
    • Get multiple portfolios
    • Create a portfolio
    • Delete a portfolio
    • Get a portfolio
    • Update a portfolio
    • Add a custom field to a portfolio
    • Add a portfolio item
    • Add users to a portfolio
    • Get portfolio items
    • Remove a custom field from a portfolio
    • Remove a portfolio item
    • Remove users from a portfolio
  • Custom Field Settings
    • Get a portfolio's custom fields
    • Get a project's custom fields
  • Project Memberships
    • Get a project membership
    • Get memberships from a project
  • Project Statuses
    • Delete a project status
    • Get a project status
    • Get statuses from a project
    • Create a project status
  • Projects
    • Get multiple projects
    • Create a project
    • Delete a project
    • Get a project
    • Update a project
    • Add a custom field to a project
    • Add followers to a project
    • Add users to a project
    • Duplicate a project
    • Remove a custom field from a project
    • Remove followers from a project
    • Remove users from a project
    • Get task count of a project
    • Get projects a task is in
    • Get a team's projects
    • Create a project in a team
    • Get all projects in a workspace
    • Create a project in a workspace
  • Sections
    • Get sections in a project
    • Create a section in a project
    • Move or Insert sections
    • Delete a section
    • Get a section
    • Update a section
    • Add task to section
  • Tasks
    • Get tasks from a project
      GET
    • Get tasks from a section
      GET
    • Get tasks from a tag
      GET
    • Get multiple tasks
      GET
    • Create a task
      POST
    • Delete a task
      DELETE
    • Get a task
      GET
    • Update a task
      PUT
    • Set dependencies for a task
      POST
    • Set dependents for a task
      POST
    • Add followers to a task
      POST
    • Add a project to a task
      POST
    • Add a tag to a task
      POST
    • Get dependencies from a task
      GET
    • Get dependents from a task
      GET
    • Duplicate a task
      POST
    • Unlink dependencies from a task
      POST
    • Unlink dependents from a task
      POST
    • Remove followers from a task
      POST
    • Remove a project from a task
      POST
    • Remove a tag from a task
      POST
    • Set the parent of a task
      POST
    • Get subtasks from a task
      GET
    • Create a subtask
      POST
    • Get tasks from a user task list
      GET
    • Search tasks in a workspace
      GET
  • Stories
    • Delete a story
    • Get a story
    • Update a story
    • Get stories from a task
    • Create a story on a task
  • Tags
    • Get multiple tags
    • Create a tag
    • Delete a tag
    • Get a tag
    • Update a tag
    • Get a task's tags
    • Get tags in a workspace
    • Create a tag in a workspace
  • Team Memberships
    • Get team memberships
    • Get a team membership
    • Get memberships from a team
    • Get memberships from a user
  • Users
    • Get users in a team
    • Get multiple users
    • Get a user
    • Get a user's favorites
    • Get users in a workspace or organization
  • Time Periods
    • Get time periods
    • Get a time period
  • User Task Lists
    • Get a user task list
    • Get a user's task list
  • Workspace Memberships
    • Get workspace memberships for a user
    • Get a workspace membership
    • Get the workspace memberships for a workspace
  • Webhooks
    • Get multiple webhooks
    • Establish a webhook
    • Delete a webhook
    • Get a webhook
  • Workspaces
    • Get multiple workspaces
    • Get a workspace
    • Update a workspace
    • Add a user to a workspace or organization
    • Remove a user from a workspace or organization
  • Typeahead
    • Get objects via typeahead
  1. Tasks

Update a task

PUT
/tasks/{task_gid}
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 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

Body Params application/json

Examples

Responses

🟢200Successfully updated the specified task.
application/json
Body

🟠400400
🟠401401
🟠403403
🟠404404
🔴500500
Modified at 2022-09-13 02:00:32
Previous
Get a task
Next
Set dependencies for a task
Built with