Documents
Upload files and track processing status.
All endpoints require the dashboard X-Clerk-User-Id header.
Upload document
POST
/kbs/{kb_id}/documentsMultipart file upload. Processing starts immediately.
curl
curl -X POST https://api.docubix.com/kbs/{kb_id}/documents -H "X-Clerk-User-Id: your_clerk_user_id" \
-F "file=@biology.pdf"json
{
"id": "...",
"filename": "biology.pdf",
"status": "queued"
}List documents
GET
/kbs/{kb_id}/documentscurl
curl https://api.docubix.com/kbs/{kb_id}/documents -H "X-Clerk-User-Id: your_clerk_user_id"Get document details
GET
/documents/{document_id}GET
/documents/{document_id}/jobProcessing job progress.
Use PATCH /documents/{id} to rename and PUT /documents/{id}/file to replace the file.
Retry failed document
POST
/documents/{document_id}/retryOnly documents with status failed can be retried.
json
{
"id": "...",
"status": "queued"
}Delete document
DELETE
/documents/{document_id}json
{
"success": true
}Document statuses
| Status | Meaning |
|---|---|
| queued | Waiting to start processing |
| extracting | Extracting text from the file |
| chunking | Splitting text into chunks |
| embedding | Generating vector embeddings |
| completed | Ready to query |
| failed | Processing failed — check error_message and retry |