Skip to main content
POST
Upload a document

Authorizations

Authorization
string
header
required

Dashboard JWT token from Clerk

Path Parameters

id
string
required

Knowledge base ID (kb_…).

Body

application/json
name
string
required

Document title.

Maximum string length: 200
content
string
required

The document body (inline text). Max 10 MB via this JSON path.

type
string

Source type / extension (e.g. text, markdown, pdf, html). Defaults to text.

source_url
string<uri>

Optional origin URL the content was fetched from.

metadata
object

Optional arbitrary metadata to store alongside the document.

Response

202 - application/json

The document was accepted and queued for indexing (returned in processing status).

data
object
required

A document stored in a knowledge base. Uploaded text is chunked and embedded for retrieval; internal chunk rows are never returned here.

meta
object
required