Sample - Asana API
POST/task_templates/{task_template_gid}/instantiateTask

Instantiate a task from a task template

Creates a job that asynchronously instantiates a task from the specified task template. Supply an optional task name in the data object; when omitted, the task template name is used. Poll the returned job resource to monitor task creation progress.

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

1 parameter · 1 body field
opt_fieldsarray<string>optional
Comma-separated properties to include in the job response, including nested properties. Supported values include new_graph_export, new_graph_export.completed_at, new_graph_export.created_at, new_graph_export.download_url, new_portfolio, new_portfolio.name, new_portfolio.resource_subtype, new_project, new_project.name, new_project.resource_subtype, and new_project_template.name, plus additional documented values.

Optional inputs used to instantiate a task from the task template.

dataobjectoptional
Task instantiation attributes, including the optional name of the new task.

6 status codes
201Returns a job object representing the asynchronous task-instantiation process, including its identifier, status, and any created task or related resources.
dataobjectoptional
A *job* is an object representing a process that handles asynchronous work.
400Returned when the request is malformed or a supplied task-instantiation value is invalid.
errorsarray<object>optional
401Returned when a valid authentication token is not provided with the request.
errorsarray<object>optional
403Returned when the authenticated user is not permitted to instantiate a task from the template.
errorsarray<object>optional
404Returned when the task template or requested action does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the instantiation job from being created.
errorsarray<object>optional

Error handling

A 400 is returned when the request is malformed or the name value is invalid. A 401 is returned when no valid authentication token is provided, and a 403 is returned when the authenticated user lacks access to the task template. A 404 is returned when the task template or action does not exist, while a 500 indicates a server-side failure.