Asana API

Getting access, Developing, Testing

Back to Asana

Create A Tag

Creates a new tag in a workspace or organization.

Every tag is required to be created in a specific workspace or organization, and this cannot be changed once set. Note that you can use the workspace parameter regardless of whether or not it is an organization.

Returns the full record of the newly created tag.

Input

type: object properties: parameters: type: object properties: opt_pretty: type: boolean description: >- 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. opt_fields: type: array items: type: string description: >- Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. title: Parameters data: type: object properties: data: type: object properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: >- Name of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. type: string example: Stuff to buy color: type: string description: Color of the tag. nullable: true enum: - dark-pink - dark-green - dark-blue - dark-red - dark-teal - dark-brown - dark-orange - dark-purple - dark-warm-gray - light-pink - light-green - light-blue - light-red - light-teal - light-brown - light-orange - light-purple - light-warm-gray example: light-green notes: description: >- Free-form textual information associated with the tag (i.e. its description). type: string example: Mittens really likes the stuff from Humboldt. followers: type: array items: type: string workspace: type: string x-env-variable: true description: Gid of an object. example: '12345' title: Data

Output

type: object properties: data: type: object properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: >- Name of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. type: string example: Stuff to buy color: type: string description: Color of the tag. nullable: true enum: - dark-pink - dark-green - dark-blue - dark-red - dark-teal - dark-brown - dark-orange - dark-purple - dark-warm-gray - light-pink - light-green - light-blue - light-red - light-teal - light-brown - light-orange - light-purple - light-warm-gray example: light-green notes: description: >- Free-form textual information associated with the tag (i.e. its description). type: string example: Mittens really likes the stuff from Humboldt. created_at: description: The time at which this resource was created. type: string format: date-time readOnly: true example: '2012-02-22T02:06:58.147Z' followers: description: Array of users following this tag. type: array readOnly: true items: type: object properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: '*Read-only except when same user as requester*. The user’s name.' example: Greg Sanchez workspace: type: object properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the workspace. type: string example: My Company Workspace permalink_url: type: string readOnly: true description: A url that points directly to the object within Asana. example: https://app.asana.com/0/resource/123456789/list