Propose Tag
Idempotent by slug — a value the Tags field doesn’t recognize calls this to coin it,
and calling it again for the same slug just returns the tag that already exists (so an admin
adding a tag someone already coined does not silently re-status it).
status is admin-only: without the check, anyone with write access could coin a tag straight
into the shared vocabulary and skip the review that promotion exists to be.
POST
/api/v1/tagsAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredRequest body
requiredapplication/jsonslugstringrequiredmin length 1 · max length 32
labelstringrequiredmin length 1 · max length 64
statusTagStatus | anyShow propertiesHide properties
Any of:
TagStatus
stringany
anyResponses
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 POST "/api/v1/tags" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"slug": "string",
"label": "string",
"status": "proposed"
}'const response = await fetch("/api/v1/tags", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"slug": "string",
"label": "string",
"status": "proposed"
})
});import requests
response = requests.post(
"/api/v1/tags",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"slug": "string",
"label": "string",
"status": "proposed"
},
)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": {}
}
]
}