Skip to main content
POST
/
api
/
v1
/
tags
Create a new tag
curl --request POST \
  --url https://app.sajn.se/api/v1/tags \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "name": "<string>",
  "color": "<string>",
  "availableFor": [
    "DOCUMENT"
  ]
}'
{
  "id": "<string>",
  "name": "<string>",
  "color": "<string>",
  "availableFor": [
    "<string>"
  ],
  "createdAt": "<any>",
  "updatedAt": "<any>"
}

Headers

authorization
string
required

Bearer token for API authentication

Body

application/json

Body

Create tag request

name
string
required

Tag name (required)

Minimum length: 1
availableFor
enum<string>[]
required

Where this tag can be used

Minimum length: 1
color
string

Tag color in hex format (e.g., #FF5733)

Response

200

id
string
required

Unique tag identifier

name
string
required

Tag name

color
string
required

Tag color in hex format (e.g., #FF5733)

availableFor
string[]
required

Where this tag can be used: DOCUMENT, TEMPLATE, and/or CONTACT

createdAt
any
required

Date and time when tag was created

updatedAt
any
required

Date and time when tag was last updated

I