Create a new tag
You're viewing API version
2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.POST
Create a new tag for organizing documents, templates, or contacts.
Required Fields:
name- Tag name (must be unique)availableFor- Where tag can be used: DOCUMENT, TEMPLATE, or CONTACT
Optional Fields:
color- Hex color code (e.g., #FF5733)
header
AuthorizationBearer <token>Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.
Idempotency-Key?stringMakes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.
Length
length <= 255Body
application/json- body
Create tag request
name*stringTag name (required)
Length
1 <= lengthcolor?stringTag color in hex format (e.g., #FF5733)
Match
^#[0-9A-F]{6}$availableFor*array<>Where this tag can be used
Items
1 <= items200
application/json- response
id*stringUnique tag identifier
name*stringTag name
color*stringTag color in hex format (e.g., #FF5733)
availableFor*array<string>Where this tag can be used: DOCUMENT, TEMPLATE, and/or CONTACT
createdAt*stringDate and time when tag was created
Format
date-timeupdatedAt*stringDate and time when tag was last updated
Format
date-timecurl -X POST 'https://app.sajn.se/api/v1/tags' \ -H 'authorization: string' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "availableFor": [ "DOCUMENT" ]}'Example Response
{ "id": "string", "name": "string", "color": "string", "availableFor": [ "string" ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Was this page helpful?