API Reference
List documents
GET /api/v1/knowledge-bases/:knowledgeBaseId/documents — documents and their ingestion status.
Lists the Knowledge Base's uploaded documents with their ingestion status. A document moves from PENDING through INDEXING to COMPLETED, or to FAILED. Poll this after an upload until every document is COMPLETED or FAILED; a document is searchable once it is COMPLETED.
GET /api/v1/knowledge-bases/{knowledgeBaseId}/documentsResponse
200 OK
{
"items": [
{
"documentId": "9d0a…",
"filename": "pump-x200.pdf",
"status": "COMPLETED",
"fileSize": 812933,
"chunkingStrategy": "recursive",
"chunkSize": 1000,
"overlap": 200,
"metadata": null,
"errorDetail": null,
"createdAt": "2026-10-09T08:00:00Z",
"updatedAt": "2026-10-09T08:01:12Z"
}
]
}errorDetail says why a FAILED document failed, for example a scanned PDF with no extractable text.
Errors
| Status | error | When |
|---|---|---|
403 | forbidden | Your key is scoped to a different project. |
404 | not_found | No such Knowledge Base in your organization. |