Skip to main content
POST
Upsert documents with BYO vectors

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.

Path Parameters

namespace_id
string
required

The namespace to upsert documents into.

Example:

"ns_abc123def456"

Body

application/json

Request body for BYO document upsert.

documents
BYODocument · object[]
required

Documents to upsert. Maximum 1000 per call.

Maximum array length: 1000
collection_id
string | null

Target collection. Documents are tagged with this collection_id so they appear in collection-scoped queries, list, and clustering. When omitted a namespace-level default collection is used.

options
UpsertOptions · object | null

Optional upsert behavior flags.

Response

Successful Response

Response from a BYO document upsert.

inserted
integer
required

Number of documents upserted.

document_ids
string[]
required

IDs of all upserted documents.

write_token
string | null

Opaque token for read-your-writes consistency (only when requested).

dropped_payload_fields
Dropped Payload Fields · object

document_id -> payload field names that were REMOVED before storage because they collide with reserved internal field names. Their values are not stored anywhere and are not readable back. Rename the field (e.g. 'source_type' -> 'my_source_type') or nest it under 'metadata' to keep the value. Empty when nothing was dropped.

consistency
WriteConsistency · object

How and when this write becomes visible to retriever reads.