Skip to main content
POST
Upload a document into a knowledge base

Headers

x-user-id
string
required

Caller's user ID. Temporary header-based identity; will be replaced by JWT auth.

Path Parameters

knowledge_base_id
string
required

The knowledge base id.

Body

multipart/form-data
file
file
required

The document to index (PDF, TXT, Markdown, …).

content_type
string | null

Override the IANA media type used to route the upload. Defaults to the type guessed from the filename.

Response

Successful Response

Response body after uploading a document into a knowledge base.

document_id
string
required

Server-assigned document identifier.

filename
string
required

The original filename of the uploaded document.

status
enum<string>
required

Lifecycle state immediately after upload — always 'pending' in the happy path; surfaced so the client can seed its progress tracker without an extra round-trip.

Available options:
pending,
parsing,
chunking,
indexing,
ready,
error