API Reference
Knowledge Base & RAG
Store content your bots use to answer questions, plus a tenant-wide vector Knowledge API for semantic (RAG) search.
Overview
There are two layers of knowledge:
- Bot knowledge base — entries scoped to a single bot, passed as context to that bot's LLM. Add plain text or upload PDF/DOCX/TXT (max 20 MB); text is extracted automatically.
- Knowledge API (RAG) — a tenant-wide vector store. Ingest text, URLs, or PDFs as sources, then run semantic search to retrieve the most relevant passages for retrieval-augmented generation.
The Knowledge API requires the
knowledge:read / knowledge:write scopes on your key.Bot Knowledge Base
GET
/api/v1/bots/:id/knowledge AuthList all knowledge entries for a bot
POST
/api/v1/bots/:id/knowledge AuthAdd a text knowledge entry
Request Body
namestring (1-255 chars)contentstring (1-100000 chars)metadataobject (optional)POST
/api/v1/bots/:id/knowledge/upload AuthUpload a file (PDF, DOCX, or TXT — max 20 MB). Text is extracted and indexed automatically.
Request Body
filemultipart file uploadDELETE
/api/v1/bots/:id/knowledge/:entry_id AuthRemove a knowledge entry
GET
/api/v1/knowledge/sources AuthList vector knowledge sources
GET
/api/v1/knowledge/sources/:source_id AuthGet a single source
POST
/api/v1/knowledge/sources AuthIngest plain text as a source (chunked + embedded)
Request Body
namestringcontentstringPOST
/api/v1/knowledge/sources/url AuthIngest a web page by URL
Request Body
urlstringnamestring (optional)POST
/api/v1/knowledge/sources/pdf AuthIngest a PDF file
Request Body
filemultipart file uploadDELETE
/api/v1/knowledge/sources/:source_id AuthDelete a source and its vectors
POST
/api/v1/knowledge/search AuthSemantic search across sources — returns ranked passages for RAG
Request Body
querystringtop_knumber (1-20, default 5)Was this page helpful?