The task is the basic object around which many operations in Asana are centered. In the Asana application, multiple tasks populate the middle pane according to some view parameters, and the set of selected tasks determines the more detailed information presented in the details pane.
Sections are unique in that they will be included in the memberships
field of task objects returned in the API (that is, when the task is within a section). They can also be used to manipulate the ordering of a task within a project.
TaskCompact
A Compact
object reflects the default fields returned after a successful API request. See input/output options to include more fields in the response.
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
name | string | The name of the task. |
resource_subtype | string | The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.default_task , milestone , approval The resource subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date . |
{
"gid": "12345",
"resource_type": "task",
"name": "Bug Task",
"resource_subtype": "default_task"
}
Task
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
actual_time_minutes | number¦null | This value represents the sum of all the Time Tracking entries in the Actual Time field on a given Task. It is represented as a nullable long value. |
approval_status | string | Conditional. Reflects the approval status of this task. This field is kept in sync with completed , meaning pending translates to false while approved , rejected , and changes_requested translate to true. If you set completed to true, this field will be set to approved . |
assignee_status | string | Deprecated. Scheduling status of this task for the user it is assigned to. This field can only be set if the assignee is non-null. Setting this field to "inbox" or "upcoming" inserts it at the top of the section, while the other options will insert at the bottom. |
completed | boolean | True if the task is currently marked complete, false if not. |
completed_at | string(date-time)¦null | The time at which this task was completed, or null if the task is incomplete. |
completed_by | object | A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks. |
completed_by .gid | string | Globally unique identifier of the resource, as a string. |
completed_by .resource_type | string | The base type of this resource. |
completed_by .name | string | Read-only except when same user as requester. The user’s name. |
created_at | string(date-time) | The time at which this resource was created. |
dependencies | object | Opt in. Array of resources referencing tasks that this task depends on. The objects contain only the GID of the dependency. |
dependencies .gid | string | Globally unique identifier of the resource, as a string. |
dependencies .resource_type | string | The base type of this resource. |
dependents | [object] | Opt in. Array of resources referencing tasks that depend on this task. The objects contain only the ID of the dependent. |
» {} .gid | string | Globally unique identifier of the resource, as a string. |
» {} .resource_type | string | The base type of this resource. |
due_at | string(date-time)¦null | The UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on . |
due_on | string(date)¦null | The localized date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format and should not be used together with due_at . |
external | object | OAuth Required. Conditional. This field is returned only if external values are set or included by using opt in. The external field allows you to store app-specific metadata on tasks, including a gid that can be used to retrieve tasks and a data blob that can store app-specific character strings. Note that you will need to authenticate with OAuth to access or modify this data. Once an external GID is set, you can use the notation external:custom_gid to reference your object anywhere in the API where you may use the original object GID. See custom external data for more details. |
external .data | string | none |
external .gid | string | none |
hearted | boolean | Deprecated - please use liked instead. True if the task is hearted by the authorized user, false if not. |
hearts | [object] | Deprecated - please use likes instead. Array of likes for users who have hearted this task. |
» {} .gid | string | Globally unique identifier of the object, as a string. |
» {} .user | object | A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks. |
» {} .user .gid | string | Globally unique identifier of the resource, as a string. |
» {} .user .resource_type | string | The base type of this resource. |
» {} .user .name | string | Read-only except when same user as requester. The user’s name. |
html_notes | string | Opt in. The notes of the text with formatting as HTML. |
is_rendered_as_separator | boolean | Opt in. In some contexts tasks can be rendered as a visual separator; for instance, subtasks can appear similar to sections without being true section objects. If a task object is rendered this way in any context, it will have the property is_rendered_as_separator set to true . |
liked | boolean | True if the task is liked by the authorized user, false if not. |
likes | [object] | Array of likes for users who have liked this task. |
» {} .gid | string | Globally unique identifier of the object, as a string. |
» {} .user | object | A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks. |
» {} .user .gid | string | Globally unique identifier of the resource, as a string. |
» {} .user .resource_type | string | The base type of this resource. |
» {} .user .name | string | Read-only except when same user as requester. The user’s name. |
memberships | [object] | Create-only. Array of projects this task is associated with and the section it is in. At task creation time, this array can be used to add the task to specific sections. After task creation, these associations can be modified using the addProject and removeProject endpoints. Note that over time, more types of memberships may be added to this property. |
» {} .project | object | A project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions. |
» {} .project .gid | string | Globally unique identifier of the resource, as a string. |
» {} .project .resource_type | string | The base type of this resource. |
» {} .project .name | string | Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. |
» {} .section | object | A section is a subdivision of a project that groups tasks together. It can either be a header above a list of tasks in a list view or a column in a board view of a project. |
» {} .section .gid | string | Globally unique identifier of the resource, as a string. |
» {} .section .resource_type | string | The base type of this resource. |
» {} .section .name | string | The name of the section (i.e. the text displayed as the section header). |
modified_at | string(date-time) | The time at which this task was last modified. Note: This does not currently reflect any changes in associations such as projects or comments that may have been added or removed from the task. |
name | string | Name of the task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. |
notes | string | Free-form textual information associated with the task (i.e. its description). |
num_hearts | integer | Deprecated - please use likes instead. The number of users who have hearted this task. |
num_likes | integer | The number of users who have liked this task. |
num_subtasks | integer | Opt in. The number of subtasks on this task. |
resource_subtype | string | The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.default_task , milestone , approval The resource subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date . |
start_at | string(date)¦null | Date and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with start_on .Note: due_at must be present in the request when setting or unsetting the start_at parameter. |
start_on | string(date)¦null | The day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format and should not be used together with start_at .Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter. |
assignee | object | A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks. |
assignee .gid | string | Globally unique identifier of the resource, as a string. |
assignee .resource_type | string | The base type of this resource. |
assignee .name | string | Read-only except when same user as requester. The user’s name. |
assignee_section | object | The assignee section is a subdivision of a project that groups tasks together in the assignee's "My Tasks" list. It can either be a header above a list of tasks in a list view or a column in a board view of "My Tasks." The assignee_section property will be returned in the response only if the request was sent by the user who is the assignee of the task. Note that you can only write to assignee_section with the gid of an existing section visible in the user's "My Tasks" list. |
assignee_section .gid | string | Globally unique identifier of the resource, as a string. |
assignee_section .resource_type | string | The base type of this resource. |
assignee_section .name | string | The name of the section (i.e. the text displayed as the section header). |
custom_fields | [object] | Array of custom field values applied to the task. These represent the custom field values recorded on this project for a particular custom field. For example, these custom field values will contain an enum_value property for custom fields of type enum , a text_value property for custom fields of type text , and so on. Please note that the gid returned on each custom field value is identical to the gid of the custom field, which allows referencing the custom field metadata through the /custom_fields/custom_field-gid endpoint . |
» {} .gid | string | Globally unique identifier of the resource, as a string. |
» {} .resource_type | string | The base type of this resource. |
» {} .asana_created_field | string¦null | Conditional. A unique identifier to associate this field with the template source of truth. |
» {} .created_by | object | A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks. |
» {} .created_by .gid | string | Globally unique identifier of the resource, as a string. |
» {} .created_by .resource_type | string | The base type of this resource. |
» {} .created_by .name | string | Read-only except when same user as requester. The user’s name. |
» {} .currency_code | string¦null | ISO 4217 currency code to format this custom field. This will be null if the format is not currency . |
» {} .custom_label | string¦null | This is the string that appears next to the custom field value. This will be null if the format is not custom . |
» {} .custom_label_position | string | Only relevant for custom fields with custom format. This depicts where to place the custom label. This will be null if the format is not custom . |
» {} .date_value | object | Conditional. Only relevant for custom fields of type date . This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null . |
» {} .date_value .date | string | A string representing the date in YYYY-MM-DD format. |
» {} .date_value .date_time | string | A string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null . |
» {} .description | string | Opt in. The description of the custom field. |
» {} .display_value | string¦null | A string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types. |
» {} .enabled | boolean | Conditional. Determines if the custom field is enabled or not. |
» {} .enum_options | [object] | Conditional. Only relevant for custom fields of type enum . This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options. |
»» {} .gid | string | Globally unique identifier of the resource, as a string. |
»» {} .resource_type | string | The base type of this resource. |
»» {} .color | string | The color of the enum option. Defaults to none . |
»» {} .enabled | boolean | Whether or not the enum option is a selectable value for the custom field. |
»» {} .name | string | The name of the enum option. |
» {} .enum_value | object | Conditional. Only relevant for custom fields of type enum . This object is the chosen value of an enum custom field. |
» {} .enum_value .gid | string | Globally unique identifier of the resource, as a string. |
» {} .enum_value .resource_type | string | The base type of this resource. |
» {} .enum_value .color | string | The color of the enum option. Defaults to none . |
» {} .enum_value .enabled | boolean | Whether or not the enum option is a selectable value for the custom field. |
» {} .enum_value .name | string | The name of the enum option. |
» {} .format | string | The format of this custom field. |
» {} .has_notifications_enabled | boolean | Conditional. This flag describes whether a follower of a task with this field should receive inbox notifications from changes to this field. |
» {} .is_global_to_workspace | boolean | This flag describes whether this custom field is available to every container in the workspace. Before project-specific custom fields, this field was always true. |
» {} .multi_enum_values | [object] | Conditional. Only relevant for custom fields of type multi_enum . This object is the chosen values of a multi_enum custom field. |
»» {} .gid | string | Globally unique identifier of the resource, as a string. |
»» {} .resource_type | string | The base type of this resource. |
»» {} .color | string | The color of the enum option. Defaults to none . |
»» {} .enabled | boolean | Whether or not the enum option is a selectable value for the custom field. |
»» {} .name | string | The name of the enum option. |
» {} .name | string | The name of the custom field. |
» {} .number_value | number | Conditional. This number is the value of a number custom field. |
» {} .people_value | [object] | Conditional. Only relevant for custom fields of type people . This array of compact user objects reflects the values of a people custom field. |
»» {} .gid | string | Globally unique identifier of the resource, as a string. |
»» {} .resource_type | string | The base type of this resource. |
»» {} .name | string | Read-only except when same user as requester. The user’s name. |
» {} . precision | integer | Only relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive. For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%. The identifier format will always have a precision of 0. |
» {} .resource_subtype | string | The type of the custom field. Must be one of the given values. |
» {} .text_value | string | Conditional. This string is the value of a text custom field. |
» {} .type | string | Deprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values. |
parent | object¦null | The parent of this task, or null if this is not a subtask. This property cannot be modified using a PUT request but you can change it with the setParent endpoint. You can create subtasks by using the subtasks endpoint. |
followers | [object] | Array of users following this task. |
» {} .gid | string | Globally unique identifier of the resource, as a string. |
» {} .resource_type | string | The base type of this resource. |
» {} .name | string | The name of the task. |
» {} .resource_subtype | string | The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. The resource subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date . |
permalink_url | string | A URL that points directly to the object within Asana. |
projects | [object] | Create-only. Array of projects this task is associated with. At task creation time, this array can be used to add the task to many projects at once. After task creation, these associations can be modified using the addProject and removeProject endpoints. |
» {} .gid | string | Globally unique identifier of the resource, as a string. |
» {} .resource_type | string | The base type of this resource. |
» {} .name | string | Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. |
tags | [object] | Array of tags associated with this task. In order to change tags on an existing task use addTag and removeTag . |
» {} .gid | string | Globally unique identifier of the resource, as a string. |
» {} .resource_type | string | The base type of this resource. |
» {} .name | string | Name of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. |
workspace | object | Create-only. The workspace this task is associated with. Once created, task cannot be moved to a different workspace. This attribute can only be specified at creation time. |
workspace .gid | string | Globally unique identifier of the resource, as a string. |
workspace .resource_type | string | The base type of this resource. |
workspace .name | string | The name of the workspace. |
{
"gid": "12345",
"resource_type": "task",
"actual_time_minutes": 200,
"approval_status": "pending",
"assignee_status": "upcoming",
"completed": false,
"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": {
"data": "A blob of information",
"gid": "my_gid"
},
"hearted": true,
"hearts": [
{
"gid": "12345",
"user": {
"gid": "12345",
"resource_type": "user",
"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": "user",
"name": "Greg Sanchez"
}
}
],
"memberships": [
{
"project": {
"gid": "12345",
"resource_type": "project",
"name": "Stuff to buy"
},
"section": {
"gid": "12345",
"resource_type": "section",
"name": "Next Actions"
}
}
],
"modified_at": "2012-02-22T02:06:58.147Z",
"name": "Buy catnip",
"notes": "Mittens really likes the stuff from Humboldt.",
"num_hearts": 5,
"num_likes": 5,
"num_subtasks": 3,
"resource_subtype": "default_task",
"start_at": "2019-09-14T02:06:58.147Z",
"start_on": "2019-09-14",
"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",
"asana_created_field": "priority",
"created_by": {
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
},
"currency_code": "EUR",
"custom_label": "gold pieces",
"custom_label_position": "suffix",
"date_value": {
"date": "2024-08-23",
"date_time": "2024-08-23T22:00:00.000Z"
},
"description": "Development team priority",
"display_value": "blue",
"enabled": true,
"enum_options": [
{
"gid": "12345",
"resource_type": "enum_option",
"color": "blue",
"enabled": true,
"name": "Low"
}
],
"enum_value": {
"gid": "12345",
"resource_type": "enum_option",
"color": "blue",
"enabled": true,
"name": "Low"
},
"format": "custom",
"has_notifications_enabled": true,
"is_global_to_workspace": true,
"multi_enum_values": [
{
"gid": "12345",
"resource_type": "enum_option",
"color": "blue",
"enabled": true,
"name": "Low"
}
],
"name": "Status",
"number_value": 5.2,
"people_value": [
{
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
],
"precision": 2,
"resource_subtype": "text",
"text_value": "Some Value",
"type": "text"
}
],
"followers": [
{
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
],
"parent": {
"gid": "12345",
"resource_type": "task",
"name": "Bug Task",
"resource_subtype": "default_task"
},
"permalink_url": "https://app.asana.com/0/resource/123456789/list",
"projects": [
{
"gid": "12345",
"resource_type": "project",
"name": "Stuff to buy"
}
],
"tags": [
{
"gid": "59746",
"name": "Grade A"
}
],
"workspace": {
"gid": "12345",
"resource_type": "workspace",
"name": "My Company Workspace"
}
}