Knowledge API

In the API a bot is a knowledge-base.

Bots

PATCH /api/knowledge-bases/{id}/ updates it, POST …/{id}/avatar/ uploads an avatar.

Add knowledge

Text:

Optional: chunksize (default 1600), chunkoverlap (100), async: true to queue it and get a taskid (poll GET /api/documents/task-status/{taskid}/).

Files: POST …/{id}/ingest-file/ — multipart file (PDF, DOCX, TXT…). JSON: POST …/{id}/ingest-json-file/ or …/ingest-json-dataset/.

Search the knowledge directly

Useful to debug why a bot answered the way it did:

Documents & chunks

- GET /api/documents/?knowledgebaseid={id} — what a bot knows - GET /api/documents/{id}/full-content/, POST …/update-content/, POST …/rescrape/, POST …/ai-summarize/ - GET /api/documents/{documentpk}/chunks/ — the passages retrieval sees

Q&A pairs

POST /api/qa-pairs/bulk-import/ imports many.

Advanced retrieval

- GraphRAG — POST …/{id}/graphrag-index/, then …/graphrag-query/, GET …/graphrag-stats/ - PageIndex (vectorless, reasoning over a document tree) — …/pageindex/estimate/, …/train/, …/status/, …/tree/

Full list: [reference → knowledge-bases](/dev-docs/reference/knowledge-bases).