---
title: "Ingest Document"
method: POST
path: "/datastores/{datastore_id}/documents"
tags: ["/datastores/{id}/documents"]
---

# Ingest Document

`POST /datastores/{datastore_id}/documents`

Ingest a document into a given `Datastore`.

Ingestion is an asynchronous task. Returns a document `id` which can be used to track the status of the ingestion job through calls to the `GET /datastores/{datastore_id}/documents/{document_id}/metadata` API.

This `id` can also be used to delete the document through the `DELETE /datastores/{datastore_id}/documents/{document_id}` API.

`file` must be a PDF, HTML, DOC(X) or PPT(X) file. The filename must end with one of the following extensions: `.pdf`, `.html`, `.htm`, `.mhtml`, `.doc`, `.docx`, `.ppt`, `.pptx`.

## Path parameters

- `datastore_id` string, uuid, required — Datastore ID of the datastore in which to ingest the document

## Response `200`

Successful Response

- IngestionResponse — Response body from POST /data/documents
  - `id` string, uuid, required — ID of the document being ingested

## Other responses

- `422` — Validation Error

## Changes

- **2025-10-28** `c8152db45500` — 1 info
  - added the new optional request property `configuration`
- **2025-05-08** `17bdb8a33fb4` — 2 info
  - api tag `/datastores/{id}/documents` added
  - api tag `/datastores` removed
- **2025-02-26** `5298551c424b` — 1 info
  - added the new optional request property `metadata`

[Change history](https://skmtc.dev/contextualai/apis/endpoints/changes/datastores/:datastore_id/documents/post.md)

---

[API](https://skmtc.dev/contextualai/apis/endpoints.md) · [All operations](https://skmtc.dev/contextualai/apis/endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/contextualai/endpoints/revisions/ca7f807eec8b/schema)
