POST
/
datastores
/
{datastore_id}
/
documents
curl --request POST \
  --url https://api.contextual.ai/v1/datastores/{datastore_id}/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'metadata={
  "custom_metadata": {
    "field1": "value1",
    "field2": "value2"
  },
  "metadata_config": {
    "field1": {
      "filterable": true,
      "in_chunks": true,
      "returned_in_response": false
    },
    "field2": {
      "filterable": true
    }
  }
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

datastore_id
string
required

Datastore ID of the datastore in which to ingest the document

Body

multipart/form-data

Response

200
application/json

Successful Response

Response body from POST /data/documents