Upload knowledge base document

View as Markdown

Upload a file (md, txt, csv, tsv, pdf, docx, xlsx — max 300KB). Text is extracted server-side and becomes the editable document content; the original binary is not retained. The document is indexed immediately.

Authentication

X-API-Keystring

API key supplied via the X-API-Key header. Takes precedence over bearerApiKey when both are present.

OR
AuthorizationBearer

Same organization API key supplied as a Bearer token in the Authorization header (Authorization: Bearer <key>). Compatible with OpenAI-SDK-standard clients. Accepted by all authenticated endpoints; if both X-API-Key and Authorization: Bearer are present, X-API-Key wins.

Path parameters

knowledgeBaseIdstringRequired

Request

This endpoint expects an object.
orgSlugstringRequired
fileanyRequired
namestringOptional1-200 characters

Response

OK
any
OR
any