Add a category group to the environment
const url = 'https://api.ebitex.io/content/management/v1/taxonomy/groups/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/binding';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/binding \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "metadataFields": [ { "name": "example", "externalId": "example", "fieldTypeKey": "example", "isMandatory": true, "isEnumerable": true, "isLocalizable": true, "isContextual": true, "isPersonalizable": true, "settings": "example", "defaultValue": "example" } ] }'Makes a group from the organization’s vocabulary usable in the key’s environment: its categories then appear in pickers, validate on save, and can be used in category= filters here. A group is never added automatically, so this is how an existing group reaches an environment. Find candidates with scope=available on the list.
metadataFields is optional and takes the same field definitions a contract does; when present, every category in the group must supply a metadata document in this environment that satisfies them. Adding a group that is already here changes nothing and returns it.
Key: a management key with content.management.authoring.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
Examplegenerated
{ "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 ”The group, shaped as in the list, with isBound true.
validation_failed: errors names each 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.
No group in the organization’s vocabulary has this id, or the group comes from a content provider.
Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.