Contextual AI /datastores/{id}/documents API

The /datastores/{id}/documents API from Contextual AI — 5 operation(s) for /datastores/{id}/documents.

GitHub OpenAPI

Operations 7

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /datastores/{datastore_id}/documents Ingest a document into a datastore · Ingest Document #
Ask an LLM
“How do I upload a PDF into a datastore so it can be searched?”
“Can I attach custom metadata to a document when I ingest it?”
Tell an agent
Ingest {file} into datastore {datastore_id}.
Upload {file} to {datastore_id} with metadata {metadata}.
GET /datastores/{datastore_id}/documents List documents in a datastore · List Documents #
Ask an LLM
“Which documents have been uploaded to a datastore?”
“Can I list only documents whose ingestion job failed?”
Tell an agent
List documents in datastore {datastore_id}.
List documents in {datastore_id} with ingestion status {ingestion_job_status}.
GET /datastores/{datastore_id}/documents/{document_id}/metadata Get a document's metadata · Get Document Metadata #
Ask an LLM
“What is the status of a document's ingestion job?”
“Can I check whether a document was uploaded successfully?”
Tell an agent
Get metadata for document {document_id} in datastore {datastore_id}.
Check ingestion status of {document_id} in {datastore_id}.
PUT /datastores/{datastore_id}/documents/{document_id}/metadata Update a document's metadata · Update Document Metadata #
Ask an LLM
“Can I add custom metadata to a document after it's ingested?”
“How do I change the metadata configuration for a single document?”
Tell an agent
Update metadata of document {document_id} in {datastore_id} with {custom_metadata}.
Set metadata config {custom_metadata_config} on {document_id} in {datastore_id}.
DELETE /datastores/{datastore_id}/documents/{document_id} Delete a document from a datastore · Delete Document #
Ask an LLM
“How do I remove a document from a datastore permanently?”
“Is deleting a document from a datastore reversible?”
Tell an agent destructive · confirm first
Delete document {document_id} from datastore {datastore_id}.
Permanently remove {document_id} in {datastore_id}.
GET /datastores/{datastore_id}/documents/{document_id}/parse Get parse results for a document · Get Parse Results #
Ask an LLM
“What text did the system extract from an ingested document?”
“Can I get parse results for a document uploaded before this endpoint existed?”
Tell an agent
Get parse results for document {document_id} in datastore {datastore_id}.
Show {output_types} parse results for {document_id} in {datastore_id}.
PUT /datastores/{datastore_id}/chunks/{content_id}/content Edit a chunk's text content · Edit Chunk Content #
Ask an LLM
“Can I fix the text of a single chunk in a datastore?”
“Does editing a chunk regenerate its embeddings?”
Tell an agent
Change chunk {content_id} in datastore {datastore_id} to {content}.
Edit the text of chunk {content_id} in {datastore_id} to {content}.

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/contextual-ai:contextual-ai-datastores-id-documents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

contextual-ai-datastores-id-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Endpoints /datastores/{id}/documents API
  version: '1.0'
servers:
- url: https://api.contextual.ai/v1
security:
- BearerAuth: []
tags:


# --- truncated at 32 KB (32 KB total) ---
# Full source: https://artifacts.apis.io/contextual-ai/openapi/contextual-ai-datastores-id-documents-api-openapi.yml