Set Tag Label
Renames a tag, moving its slug with the label — the slug is derived from the label, so a
rename also repoints every creative and variation block carrying the old one. The response
carries the new slug; the tag keeps its id, status and usage.
409 on a label another tag already carries (the Tags field maps a picked label back to a
slug, so two tags reading the same would make one unpickable) and on a label whose slug is
another tag’s — two labels can differ and still derive one slug.
PATCH
/api/v1/tags/{slug}/labelAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredPath parameters
slugstringrequiredmin length 1 · max length 32
Request body
requiredapplication/jsonlabelstringrequiredmin length 1 · max length 64
Responses
200Successful Response
successbooleandefault: true
dataCreativeTagWithUsage | anyShow propertiesHide properties
Any of:
CreativeTagWithUsage
idstringrequiredslugstringrequiredlabelstringrequiredstatusTagStatusrequiredA creative tag's lifecycle. `PROPOSED` on first use (`Tags` field, coined free-form);
an admin promotes it to `APPROVED` once it earns a place in the shared vocabulary, or
retires it to `ARCHIVED`. The `slug` does not move across this — every creative that already
carries it keeps carrying it, so promotion is a one-document status write. A *rename* is the
one thing that does move it, because the slug is derived from the label; see `set_label`.
Allowed:
proposedapprovedarchivedcreated_bystringrequiredcreated_atstring<date-time>requiredupdated_atstring<date-time>requiredusage_countintegerdefault: 0
any
anymessagestring | anyShow propertiesHide properties
Any of:
string
stringany
anyerrorsstring[] | anyShow propertiesHide properties
Any of:
string[]
Array of
stringstringany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobjectRequest
curl -X PATCH "/api/v1/tags/string/label" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"label": "string"
}'const response = await fetch("/api/v1/tags/string/label", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"label": "string"
})
});import requests
response = requests.patch(
"/api/v1/tags/string/label",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"label": "string"
},
)Response
{
"success": true,
"data": {
"id": "string",
"slug": "string",
"label": "string",
"status": "proposed",
"created_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"usage_count": 0
},
"message": "string",
"errors": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}