POST
/
tags
curl --request POST \
  --url https://api.dub.co/tags \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "tag": "<string>",
  "color": "red"
}'
{
  "id": "<string>",
  "name": "<string>",
  "color": "red"
}

Authorizations

Authorization
string
headerrequired

Default authentication mechanism

Query Parameters

workspaceId
string
required

The ID of the workspace.

projectSlug
string
deprecated

The slug of the project. This field is deprecated – use workspaceId instead.

Body

application/json
tag
string
required

The name of the tag to create.

color
enum<string>

The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.

Available options:
red,
yellow,
green,
blue,
purple,
pink,
brown

Response

201 - application/json
id
string
required

The unique ID of the tag.

name
string
required

The name of the tag.

color
enum<string>
required

The color of the tag.

Available options:
red,
yellow,
green,
blue,
purple,
pink,
brown