Skip to content

Import a bundle

POST
/content/management/v1/import
curl --request POST \
--url https://api.ebitex.io/content/management/v1/import \
--header 'Authorization: Bearer <token>'

Writes a bundle into the key’s environment. The server plans the import again itself, with the same identityMode and baseTokens you would send to /import-plan, and never trusts a plan you saw earlier.

items selects what is written, as { "kind", "id", "confirmOverwrite" } using the bundle’s own ids. Name every item the plan did not call identical. An item the plan calls new must be named, or the import is refused, because nothing else would create it. An item planned as conflict is written only with confirmOverwrite: true: that flag means “overwrite what is there”, so re-plan before reaching for it. Dependencies are still resolved across the whole bundle, so written items reference the right rows.

The import is one transaction. If any selected item carries an invalid document, nothing is written and the error lists every invalid item with its failing fields, so you can fix them all and resubmit once.

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

{ "items": [ { "kind", "id", "imported", "error" } ] }

validation_failed: no body, bundle is not a bundle document, identityMode is unknown, or one or more items carry an invalid document (listed in items, with nothing written). required_item_omitted: items the plan calls new are missing from items; the response names them. unsupported_format_version: the bundle’s formatVersion is not one this server accepts; the response gives supplied and supported. unknown_property: the body has a property this API does not recognize; the response names it in property. invalid_json: the body is not valid JSON.

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.

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.

import_blocked: the plan has blockers, listed in blockers. confirm_overwrite_required: items differ from the environment and were not confirmed; they are listed in items. Re-plan before confirming.

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