Create a new tag in the workspace.

Request Body

name
string
required

Name of the tag

color
string
required

Color of the tag in hex format (e.g., #FF5733)

Response

tag
object

Tag details

Example Request

curl -X POST 'https://api.caret.so/v1/workspace/tags' \
  -H 'Authorization: Bearer {api_key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Marketing",
    "color": "#9933FF"
  }'

Example Response

{
  "tag": {
    "id": "01887270-45ab-7da0-c95d-9a9e9ebc2k89",
    "name": "Marketing",
    "color": "#9933FF",
    "createdAt": "2023-08-22T15:30:00Z"
  }
}