Skip to content

Create a category

POST
/content/management/v1/taxonomy/categories
curl --request POST \
--url https://api.ebitex.io/content/management/v1/taxonomy/categories \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "categoryGroupId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "parentCategoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "key": "example", "value": "example", "isSelectable": true, "metadata": {} }'

Creates a category in categoryGroupId, under parentCategoryId or at the top of the group when that is null. key is lowercase kebab-case, 3 to 64 characters, and unique among its siblings; the category’s path is the group’s external id followed by the keys from the top down, such as topic/news/local.

value is the display label, either a plain string or { "default": …, "locales": { … } }. Set isSelectable to false for a category that only groups others. When the group defines metadata fields, metadata is required and must satisfy them; otherwise omit it.

Key: a management key with content.management.authoring.

Media typeapplication/json
object
categoryGroupId
required
string format: uuid
parentCategoryId
required
null | string format: uuid
key
required
string
value
required
isSelectable
required
boolean
metadata
required
One of:
null
Examplegenerated
{
"categoryGroupId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"parentCategoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"key": "example",
"value": "example",
"isSelectable": true,
"metadata": {}
}

201 Created with the new category, shaped as in the group’s category list.

validation_failed: errors names each problem, such as an unknown categoryGroupId, a parentCategoryId not in that group, an invalid or duplicate key, or metadata that does not satisfy the group’s fields (reported as metadata.<field>).

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

quota_exceeded: the organization has reached its plan’s category limit; quotaKey and limit say which.

payment_required: the organization’s subscription needs attention.

permission_denied: the key’s role lacks content.taxonomy.manage.

scope_denied: the key lacks this route’s scope. tier_required: the Content Management API needs the Pro plan or above. ip_denied: the caller’s address is outside the key’s allowed ranges. app_not_available: Content is not enabled for the organization.

taxonomy_read_only: the group or category comes from a content provider and changes only when that provider is refreshed. inherited_read_only: the item is inherited from another environment and can only be changed there; sourceEnvironmentId names it.

Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.