Sample - Asana API
POST/tasks/{task_gid}/removeProject

Remove a project from a task

Removes a task from the specified project while leaving the task available in the system. Supply the project identifier for the project to remove, and use the operation with the tasks:write scope.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 body field

The project membership to remove from the task.

dataobjectoptional

6 status codes
200Returns an empty `data` object after the task has been removed from the project.
dataobjectoptional
An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.
400Returned when `project` is missing or the request is malformed.
errorsarray<object>optional
401Returned when a valid authentication token was not provided with the request.
errorsarray<object>optional
403Returned when the authenticated user does not have access to the task or project, or lacks the required `tasks:write` scope.
errorsarray<object>optional
404Returned when the request does not identify a known action or the task or project does not exist.
errorsarray<object>optional
500Returned when the API encounters a server-side problem; the response may include an error phrase.
errorsarray<object>optional

Error handling

A 400 is returned when project is missing or the request is malformed. A 401 is returned when the authenticated user does not provide a valid authentication token, and a 403 is returned when the authenticated user lacks access or the tasks:write scope. A 404 is returned when the task or project does not exist, and a 500 indicates a server error.