Skip to main content
POST
Import external documents into a collection

Authorizations

Authorization
string
header
required

Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing header returns 403; an invalid or revoked key returns 401.

X-Namespace
string
header
required

Namespace id (ns_...), not the namespace name. This scopes the request rather than authenticating it, and it is required on every operation marked x-mixpeek-namespace-scoped.

Path Parameters

collection_identifier
string
required

The ID or name of the collection to import into

Body

application/json

Request body for POST /v1/collections/{collection_id}/import.

mapping
ImportMapping · object
required

The finalized source->target mapping (validate it first).

export
Export · object

One export object (e.g. an asset with its scene arrays).

explode
ExplodeSpec · object | null

Document-explosion inputs when the export nests a doc-generating array.

dry_run
boolean
default:false

Reconstruct and validate only; write nothing.

seed_ledger
boolean
default:false

Seed the ledger for heal-skip (no-op until available).

Response

Successful Response

Result of a collection import.

imported
integer
default:0

Documents written (0 on dry_run).

reconstructed
integer
default:0

Documents reconstructed from the export.

skipped
integer
default:0

Rows that failed reconstruction.

dry_run
boolean
default:false
errors
ImportRowError · object[]
warnings
string[]