Knowledge Base

Create a knowledge base

Creates a knowledge base. TEXT and JSON sources accept inline content. FILE sources require filename, mimeType, and base64-encoded contentBase64 — the file is decoded server-side, stored in S3, and (for PDFs) text-extracted inline before the response returns.

post/v1/knowledge-base

Request body

namestring required

Customer-facing name. Unique within the project. Required.

descriptionstring nullable

Optional short blurb shown in pickers.

sourceType'TEXT' | 'FILE' | 'JSON' required

Source types accepted via the public create endpoint. URL ingestion is currently only available in the platform UI.

contentstring nullable

For TEXT: raw markdown/text. For JSON: a JSON string (validated server-side and re-formatted with stable whitespace). Required for TEXT and JSON; omit for FILE.

filenamestring nullable

For FILE: customer-supplied filename (informational only — used for download links).

mimeType'application/pdf' | 'text/plain' | 'text/markdown' nullable

For FILE: mime type of the uploaded file. Only application/pdf, text/plain, and text/markdown are accepted.

contentBase64string nullable

For FILE: base64-encoded file bytes. Required for FILE. Max 10 MB after decoding. PDFs are text-extracted server-side; image-only PDFs are rejected.

Response

The created knowledge base.

Changes