Skip to main content
POST
Answer from knowledge

Authorizations

Authorization
string
header
required

An API key from Settings → API keys, sent as Authorization: Bearer kb_live_…. A workspace key starts kb_; a personal key starts kbp_ and acts as its owner.

Headers

Kallabot-Version
enum<string>

The API version to answer as, a date (YYYY-MM-DD). Leave it out for the current version (2026-11-07). An unknown version is refused with 400 unsupported_api_version.

Available options:
2026-11-07
Example:

"2026-11-07"

Body

application/json

A question a caller might ask, answered the way the agent would from its knowledge.

source_ids, when sent, are exactly the sources searched (the editor's ticked ones, saved or not); otherwise the agent's attached sources are. agent_id also supplies the agent's own instructions for the answer.

query
string
required
Required string length: 1 - 500
agent_id
string | null

Search what this agent attaches (its draft).

source_ids
string[] | null

Or exactly these sources.

Maximum array length: 40
channel
enum<string>
default:playground
Available options:
playground,
phone,
web,
whatsapp,
instagram,
messenger,
web_chat,
tiktok
top_k
integer
default:3
Required range: 1 <= x <= 10
lang
string
default:en
Maximum string length: 8
instructions
string | null

The agent's instructions as the owner is editing them, up to 20,000 characters. When present and not blank, the answer follows these instead of the agent's saved prompt. They never change which sources are searched.

Maximum string length: 20000

Response

Successful Response

answered
boolean
required

True only when the passages contained the answer. False when nothing matched, the passages didn't say, or the answer couldn't be written.

passages
KnowledgePassage · object[]
required

The passages the answer was written from.

matched
boolean
required

At least one passage matched.

latency_ms
number
required

Search time in milliseconds.

total_ms
number
required

Total time in milliseconds.

answer
string | null

What the agent would say, in one to three short sentences. Null when no passage matched or the answer couldn't be written (see error).

error
string | null

answer_unavailable: the passages were found but the model didn't write an answer in time. Show the passages instead.

Allowed value: "answer_unavailable"
path
string | null

How the passages were found, as in search.

answer_ms
number | null

Time spent writing the answer; null when no model ran.