Skip to main content
POST
Upload a File

Path Parameters

kb_id
string
required

Knowledge Base ID.

Body

multipart/form-data
file
file
required

The file to add to the knowledge base. Supported extensions: .pdf, .docx, .txt, .md, .xlsx, .xls.

metadata
string | null

A JSON object serialised as a string, for example {"department":"HR"}. Malformed JSON is rejected with a 400.

Response

File accepted and queued for ingestion. Not yet searchable.

Acknowledgement that a document was accepted for asynchronous ingestion.

document_id
string
required

Server-minted identifier for the submitted document. Keep it - you need it to poll the status endpoint.

status
enum<string>
required

Always 'processing' at submission time.

Available options:
processing,
completed,
failed
message
string | null

Human-readable detail, for example 'File processing started'.