Skip to content
VoxaDocs
Navigation
Open console →

Knowledge bases

Test a search

POST/api/v1/knowledge-bases/{kb_id}/search

Run the search an agent runs during a call, and see the passages it would get with their scores. Passages marked relevant: false score below the cut-off and are not given to agents.

Authorization

An API key (X-API-Key or Authorization: Bearer), or a signed-in member with the agents.view permission.

X-API-KeyAuthorization: Beareragents.view

Path parameters

kb_idstringrequired

Query parameters

timezonestringdefault: "Asia/Kolkata"

IANA time zone for every timestamp in the response (at, date, timestamp and *_at fields), as ISO 8601 with the offset. The X-Timezone header works too; the zone used comes back in the X-Timezone response header. An unknown zone is a 400.

Body application/json

querystringrequired

1 to 2000 characters

limitintegerdefault: 5

1 to 20

Response

200Success.
resultsobject[]
Show item attributes
kb_idstring
source_idstring
source_namestring
textstring
scorenumber

Cosine similarity, 0 to 1.

relevantboolean

Above the cut-off the agent uses during calls.

latency_msinteger

Total time, including embedding the query.

embed_msinteger
search_msnumber
min_scorenumber

Passages below this score are not given to the agent.

401No credentials, or they are invalid or revoked.
detailstring

What went wrong, in plain words.

403Your role (or an API key) lacks the permission.
detailstring

What went wrong, in plain words.

422Validation Error
detailobject[]
Show item attributes
locstring | integer[]
msgstring
typestring
429Over the per-key rate limit; wait for Retry-After.
detailstring

What went wrong, in plain words.

Esc