Skip to main content
POST
Search knowledge base

Authorizations

X-API-KEY
string
header
required

Body

application/json
query
string
required

Natural-language search text. Required and non-empty (trimmed).

knowledge_base_id
string
required

Knowledge base to search. Required; a KB id outside the caller's workspace simply matches zero documents (no cross-tenant leak).

top_k
integer
default:3

Number of matches to return. Defaults to 3; must be an integer between 1 and 10.

Required range: 1 <= x <= 10

Response

Matches ordered best-first. match_percentage is the similarity score scaled to 0-100. Returns an empty data array when nothing matches (including when the KB is empty or belongs to another workspace).