Documents API
Read indexed document content and summaries from the dashboard API.
:::info Dashboard API
Document endpoints live on the dashboard API (/api/v1/documents/...) and require a session JWT — they are not available on the public /v1/... API key surface. Manage documents through the dashboard UI or from server-side code that holds a session token.
:::
Get Document Content
Endpoint
GET /api/v1/documents/{id}/content
Response
{
"data": {
"id": "doc_abc123",
"title": "Getting Started Guide",
"content": "Full document content...",
"status": "indexed",
"collection": "Documentation",
"source": "Confluence",
"metadata": {
"author": "John Doe",
"url": "https://...",
"pages": 5
}
}
}
Get Document Summary
Endpoint
GET /api/v1/documents/{id}/summary
Response
{
"data": {
"id": "doc_abc123",
"title": "Getting Started Guide",
"summary": "This guide covers...",
"metadata": {
"author": "John Doe",
"url": "https://..."
}
}
}
Deleting documents
Document deletion is handled on the connector / collection level, not as a per-document API call. Re-syncing a connector with deletion detection enabled will remove documents that no longer exist at the source. To remove all documents from a collection, delete the collection.
Document Status
| Status | Description |
|---|---|
pending | Waiting for processing |
processing | Currently being indexed |
indexed | Successfully indexed |
failed | Indexing failed |
deleted | Removed from index |
Example Usage
Get Document Content
const doc = await client.documents.getContent('doc_xyz789');
console.log(doc.title, doc.content);
Get Document Summary
const summary = await client.documents.getSummary('doc_xyz789');
console.log(summary.summary);
Delete Document
await client.documents.delete('doc_xyz789');
Next Steps
- Collections API - Manage collections
- Search API - Search documents