/api/v1/object/field/tagAdd a tag to the workspace list.
Add a tag to the workspace list.
The new tag can be set on records of every object right away. label is
required (1 to 100 characters). color is a hex color; when you omit it,
the tag gets one from a fixed palette. The tag's value is set from the
label once and does not change on a later rename.
Labels are unique, ignoring surrounding spaces and letter case. When a
retired tag has the same label, it is restored with its original slug
and its current usage instead of creating a second tag.
Scope: object.update. To add a tag while editing a record, with only
write access to that record's object, use
POST /object/field/tag/unit/{objectSlug}.
Errors:
409— a live tag already has this label. The error carriescode: TAG_ALREADY_EXISTSand the existing tag's slug indata.slug.422— the body is invalid, for example an emptylabelor acolorthat is not a hex color.
Request:
{
"label": "Partner",
"color": "#10B981"
}
Response 201:
{
"status": 201,
"message": "Tag created successfully",
"data": {
"slug": "8d2b6e4f-1a3c-4b5d-9e7f-0a1b2c3d4e5f",
"label": "Partner",
"value": "Partner",
"color": "#10B981",
"is_archived": false,
"usage_count": 0,
"units": []
}
}
Error 409:
{
"status": 409,
"message": "A tag called \"Partner\" already exists.",
"code": "TAG_ALREADY_EXISTS",
"data": { "slug": "8d2b6e4f-1a3c-4b5d-9e7f-0a1b2c3d4e5f" }
}
Send request
Use the documented inputs to call this endpoint directly.
Request body
application/jsonrequiredResponses
Successful response
{
"slug": "string",
"label": "string",
"value": "string",
"color": "string",
"icon": "string",
"is_archived": true,
"usage_count": 1.5,
"units": "string"
}A retired tag: still rendered on records that hold it, never pickable.
Live records holding this tag across every Unit.
Bad request
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Unauthorized
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Internal server error
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Powered by heyo-docs