Skip to main content
Endpoints to manage the chatbot’s corpus (knowledge base).

GET /tenants//corpus

List all corpus entries. Required scope: corpus:read

Request

Query Parameters

Response

GET /tenants//corpus/

Retrieve a specific entry. Required scope: corpus:read

POST /tenants//corpus

Create a new entry. Required scope: corpus:write

Request

Body

summary vs content — a two-tier knowledge base

An entry has two levels, and choosing between them is the single decision that determines whether a large knowledge base works at all. Without a summary, the whole content goes into the system prompt of every conversation. That is fine for a handful of short entries. With a summary, only the summary is in the prompt; the content stays out and the agent fetches it on demand through its explore_corpus tool (injected automatically as soon as one entry has a summary). This is what lets fifty entries coexist: prompt sections are capped, and past the cap later entries are simply never loaded — silently. A summary must carry the substance in compressed form, not describe the entry. The test: if the agent only had the summary, would its answer be right — merely less detailed? If the answer is “it would know nothing”, the summary is wrong.
The field is named summary, which sounds like catalogue metadata. It is not: it is the text the model reads. "Covers our pricing and refund rules" leaves the agent unable to answer anything. "Refunds within 14 days, no questions asked; shipping is not refunded" lets it answer, and tells it there is more worth fetching.

Response

PATCH /tenants//corpus/

Modify an existing entry. Required scope: corpus:write

DELETE /tenants//corpus/

Delete an entry. Required scope: corpus:write

Response

POST /tenants//corpus/bulk

Batch upsert corpus entries, keyed by externalId (idempotent — re-sending the same externalId updates the existing entry instead of creating a duplicate). Used for the WordPress initial sync. Required scope: corpus:write

Body

Each item accepts externalId (required), title (required), content (required), summary, sourceUrl, source, segmentSlug, priority, isActive.

Response

New entries beyond the tenant’s corpus limit come back with status: "skipped" and a reason.