Skip to main content
POST
Retrieve ranked policy chunks for a question

Authorizations

X-API-Key
string
header
required

Headers

x-admin-secret
string | null

Admin bootstrap secret required for privileged bootstrap/provisioning operations.

Body

application/json
query
string
required
user_uid
string
required
document_id
string | null

Legacy single-doc id — merged into document_ids when both are sent

document_ids
string[]

One or more workspace document ids in the review scope (max 20)

package
string | null
top_n
integer
default:20
Required range: 1 <= x <= 100

Response

Successful Response

candidate_count
integer
default:0

Chunks considered for this document before top_n truncation

chunks
PolicyChunkResponse · object[]
max_query_score
integer
default:0

Highest query_score among all candidates (not just returned top_n)