Sample - Asana API
POST/tags

Create a tag

Creates a new tag in a workspace or organization. Supply the tag properties in data, including the workspace or organization where the tag will be created; that association cannot be changed after creation. The response contains the complete newly created tag record.

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

1 parameter · 1 body field
opt_fieldsarray<string>optional
Comma-separated fields to include in the response, including color, created_at, followers, followers.name, name, notes, permalink_url, workspace, or workspace.name.

The tag properties to create, supplied in the data object. Include the workspace or organization that will own the tag.

dataobjectoptional
The tag properties for the new tag, including its name, notes, color, followers, and workspace as supported by the request schema.

6 status codes
201Returns the complete newly created tag record.
dataobjectoptional
400Returned when a request parameter or body value is missing or 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 create the tag or its specified properties.
errorsarray<object>optional
404Returned when the request action is unknown or the specified object does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the request from completing.
errorsarray<object>optional

Error handling

A 400 is returned when a parameter or request body value is missing or malformed. A 401 is returned without valid authentication, and a 403 is returned when the authenticated user cannot create tags in the target workspace or organization. A 404 indicates that the requested action or object does not exist, while a 500 indicates a server-side failure; the caller must also have the tags:write scope and provide workspace in data.