Tasks
Add a project to a task
<b>Required scope: </b><code>tasks:write</code>
Adds the task to the specified project, in the optional location specified. If no location arguments are given, the task will be added to the end of the project.
addProject can also be used to reorder a task within a project or section that already contains it.
Positioning the task:
- Use insert_before or insert_after with a task ID to position relative to another task
- Use section alone to add the task to the end of a section
- Use section with insert_after: null to add to the beginning of a section
- Use section with insert_before: null to add to the end of a section
- Use section with insert_before or insert_after (non-null) to position relative to a task within that section. The anchor task must be in the specified section.
At most one of insert_before or insert_after should be specified (both cannot be used together).
A task can have at most 20 projects multi-homed to it.
Returns an empty data block.
post/tasks/{task_gid}/addProject
Request
- Base URL: https://app.asana.com/api/1.0
- URL: https://app.asana.com/api/1.0/tasks/{task_gid}/addProject
- 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, scopes: tasks:write)
Request body
Example request
{
"data": {
"project": "13579",
"insert_after": "124816",
"insert_before": "432134",
"section": "987654"
}
}Response
Successfully added the specified project to the task.
Changes
No recorded changes to this operation across all 2 revisions of this API.