Time tracking entries

Update a time tracking entry

A specific, existing time tracking entry can be updated by making a PUT request on the URL for that time tracking entry. 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 time tracking entry record.

Access requirements

Access to this endpoint has two levels:

  • Endpoint access requires time tracking to be available through the domain's plan or add-ons. A request from a domain without time tracking access returns a 402 Payment Required error for every request to this endpoint.

  • Field access for some request fields requires the Timesheets and Budgets add-on. Fields with this requirement are noted in the request schema. Including one of these fields without the add-on returns a 402 Payment Required error, even when the rest of the request is valid.

Because the field-level requirement is separate, the same endpoint may return 200 or 402 for the same domain depending on which fields are sent: a request that only uses fields available with endpoint access succeeds on any domain that meets the endpoint requirement, while a request that includes a field requiring the add-on also requires the add-on.

put/time_tracking_entries/{time_tracking_entry_gid}

Request

  • Base URL: https://app.asana.com/api/1.0
  • URL: https://app.asana.com/api/1.0/time_tracking_entries/{time_tracking_entry_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": {
    "duration_minutes": 12,
    "entered_on": "2023-03-19",
    "attributable_to": "987654",
    "assignee": "12345",
    "billable_status": "billable",
    "description": "My description of work done on this entry",
    "categories": [
      "12345"
    ]
  }
}

Response

Successfully updated the time tracking entry.

Example response

{
  "data": {
    "gid": "12345",
    "resource_type": "time_tracking_entry",
    "duration_minutes": 12,
    "entered_on": "2015-03-14",
    "attributable_to": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy",
      "resource_subtype": "default_project"
    },
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "categories": [
      {
        "gid": "12345",
        "resource_type": "time_tracking_category",
        "name": "Development",
        "color": "blue"
      }
    ],
    "task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task",
      "created_by": {
        "gid": "1111",
        "resource_type": "user"
      }
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "approval_status": "DRAFT",
    "billable_status": "billable",
    "description": "My description of work done on this entry"
  }
}

Changes

No operation changes recorded.