Skip to content

Create an adapter

POST
/content/management/v1/adapters
curl --request POST \
--url https://api.ebitex.io/content/management/v1/adapters \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "externalId": "example", "name": "example", "inputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "outputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rules": [ "example" ], "layout": {} }'

Creates a named adapter from externalId, name, inputContractId, outputContractId and rules. externalId is lowercase kebab-case, 3 to 64 characters, unique in the environment, and cannot be changed later.

Each rule maps one output field: direct copies an input field, computed builds a value from a small expression tree, nested maps a structured value through another adapter (named by id, or inline), and lookup reads from another component. The rules are validated against both contracts before anything is saved; send them to /adapters/validate first to see the same findings without saving.

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

Media typeapplication/json
object
externalId
required
string
name
required
string
inputContractId
required
string format: uuid
outputContractId
required
string format: uuid
rules
required
array
layout
One of:
null
Examplegenerated
{
"externalId": "example",
"name": "example",
"inputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"outputContractId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"rules": [
"example"
],
"layout": {}
}

The created adapter, shaped as getAdapter returns it.

validation_failed: externalId is not valid kebab-case of 3 to 64 characters, or name is empty.

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.adapters.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.

duplicate_external_id: an adapter with this external id already exists in the environment.

adapter_invalid: the adapter cannot be saved. errors lists each problem as { path, code, message }: invalid_rules (the rules are not well-formed), contract_not_found (the input or output contract does not exist), nested_adapter_not_found (a nested rule names an adapter that does not exist in this environment), and the type-compatibility and coverage problems /adapters/validate reports.

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