POST /sections/{section_gid}/addTask
Required scope: tasks:write
Add a task to a specific, existing section. This will remove the task from other sections of the project.
The task will be inserted at the top of a section unless an insert_before or insert_after parameter is declared.
This does not work for separators (tasks with the resource_subtype of section).
Servers
- https://app.asana.com/api/1.0
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
section_gid |
String | Yes |
The globally unique identifier for the section. |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
opt_pretty |
Boolean | No |
Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
data |
Object | No | |
data.insert_after |
String | No |
An existing task within this section after which the added task should be inserted. Cannot be provided together with insert_before. |
data.task |
String | Yes |
The task to add to this section. |
data.insert_before |
String | No |
An existing task within this section before which the added task should be inserted. Cannot be provided together with insert_after. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.