Skip to main content
POST
Ingest Document

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

datastore_id
string<uuid>
required

Datastore ID of the datastore in which to ingest the document

Body

multipart/form-data
file
file
required

File to ingest.

metadata
string

Metadata request in stringified JSON format. custom_metadata is a flat dictionary containing one or more key-value pairs, where each value must be a primitive type (str, bool, float, or int). The default maximum metadata fields that can be used is 15, contact support@contextual.ai if more is needed. The combined size of the metadata must not exceed 2 KB when encoded as JSON. The strings with date format must stay in date format or be avoided if not in date format. The custom_metadata.url or link field is automatically included in returned attributions during query time, if provided.

Example:
configuration
string

Overrides the datastore's default configuration for this specific document. This allows applying optimized settings tailored to the document's characteristics without changing the global datastore configuration.

Example:

Response

Successful Response

Response body from POST /data/documents

id
string<uuid>
required

ID of the document being ingested