Documents
Uploads a PDF into a knowledge base and queues it for ingestion. Send multipart/form-data with a knowledge_base_id and a file. The file must be a valid PDF (content-checked), max 20 MB. The document is created with status QUEUED and processed asynchronously — text extraction → chunking → embedding → vector indexing; poll GET /api/ext/document/{document_id} for status. Returns the created document. Only PDF is supported today (/url and /text are not yet available).
curl --request POST \
--url 'https://api.nabrah.ai/api/ext/document/file' \
--header 'X-API-Key: <your-api-key>'{
"id": "00000000-0000-4000-8000-000000000000",
"knowledge_base_id": "00000000-0000-4000-8000-000000000000",
"type": "file",
"status": "unknown",
"title": "string",
"summary": "string",
"filename": "string",
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z"
}knowledge_base_idThe target knowledge base id to attach the document to.
knowledge_base_idfileThe PDF file to ingest. Must be a valid PDF (verified by content), maximum 20 MB.
fileThe document returns immediately as QUEUED and is embedded in the background — it becomes retrievable once its status reaches DONE.
X-API-KeystringheaderrequiredYour workspace API key. Create one in the dashboard under API keys.
Successful Response
application/json
Validation Error
application/json