Skip to main content
POST
Query knowledge base

Authorizations

Authorization
string
header
required

Voiceflow bearer token

Query Parameters

projectID
string
required

The ID of the project to operate on.

environmentAlias
string
required

The alias of the environment to operate on (e.g. main).

Body

application/json
version
enum<string>
required

Whether to query the draft or the published version of the knowledge base.

Available options:
draft,
published
question
string
required

The natural-language question to ask the knowledge base.

filters
object

Metadata filters used to narrow down which document chunks are searched.

settings
object
synthesis
boolean

Whether to synthesize an answer from the retrieved chunks; when false, only raw chunks are returned.

chunkLimit
integer

The maximum number of document chunks to retrieve.

Required range: 1 <= x <= 30
instruction
string

An additional instruction applied when synthesizing the answer from the retrieved chunks.

Response

200 - application/json

Returns the answer generated from the knowledge base and the chunks it was drawn from, alongside the model used, the duration, and the token accounting for the call.

answer
object
required

The result of the knowledge base query, including the synthesized answer and token usage.