Skip to main content

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:

  1. 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.
  2. 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.
note
The Knowledge API requires the knowledge:read / knowledge:write scopes on your key.

Bot Knowledge Base

GET/api/v1/bots/:id/knowledge Auth

List all knowledge entries for a bot

POST/api/v1/bots/:id/knowledge Auth

Add a text knowledge entry

Request Body

namestring (1-255 chars)
contentstring (1-100000 chars)
metadataobject (optional)
POST/api/v1/bots/:id/knowledge/upload Auth

Upload a file (PDF, DOCX, or TXT — max 20 MB). Text is extracted and indexed automatically.

Request Body

filemultipart file upload
DELETE/api/v1/bots/:id/knowledge/:entry_id Auth

Remove a knowledge entry

GET/api/v1/knowledge/sources Auth

List vector knowledge sources

GET/api/v1/knowledge/sources/:source_id Auth

Get a single source

POST/api/v1/knowledge/sources Auth

Ingest plain text as a source (chunked + embedded)

Request Body

namestring
contentstring
POST/api/v1/knowledge/sources/url Auth

Ingest a web page by URL

Request Body

urlstring
namestring (optional)
POST/api/v1/knowledge/sources/pdf Auth

Ingest a PDF file

Request Body

filemultipart file upload
DELETE/api/v1/knowledge/sources/:source_id Auth

Delete a source and its vectors

POST/api/v1/knowledge/search Auth

Semantic search across sources — returns ranked passages for RAG

Request Body

querystring
top_knumber (1-20, default 5)
Was this page helpful?