Create a category group
const url = 'https://api.ebitex.io/content/management/v1/taxonomy/groups';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"externalId":"example","name":"example","metadataFields":[{"name":"example","externalId":"example","fieldTypeKey":"example","isMandatory":true,"isEnumerable":true,"isLocalizable":true,"isContextual":true,"isPersonalizable":true,"settings":"example","defaultValue":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ebitex.io/content/management/v1/taxonomy/groups \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "externalId": "example", "name": "example", "metadataFields": [ { "name": "example", "externalId": "example", "fieldTypeKey": "example", "isMandatory": true, "isEnumerable": true, "isLocalizable": true, "isContextual": true, "isPersonalizable": true, "settings": "example", "defaultValue": "example" } ] }'Creates a group from externalId, name and optional metadataFields. externalId is lowercase kebab-case, 3 to 64 characters, unique in the environment, and cannot be changed afterwards, since it is part of every category path in the group.
metadataFields takes the same field definitions a contract does. When present, every category in the group must supply a metadata document that satisfies them; when absent, categories carry no metadata.
Key: a management key with content.management.authoring.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "externalId": "example", "name": "example", "metadataFields": [ { "name": "example", "externalId": "example", "fieldTypeKey": "example", "isMandatory": true, "isEnumerable": true, "isLocalizable": true, "isContextual": true, "isPersonalizable": true, "settings": "example", "defaultValue": "example" } ]}Responses
Section titled “ Responses ”201 Created with the new group, shaped as in the list.
validation_failed: errors names each problem, such as an invalid or duplicate externalId, a missing name, or an invalid metadata field (reported as metadataFields[n]…).
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.
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.
Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.