Skip to content

Search policy entries

GET
/api/workspaces/{workspaceId}/policy-entries/search

Performs a full-text search across policy entries in a workspace. Searches against topic and rule text. An empty query returns no results.

workspaceId
required
string format: uuid

The workspace to search within.

q
string

Search query to match against policy content.

Example
discount

The matching policies, the best match first. A blank query answers an empty list.

Array<object>

A policy that matches a search.

object
id
required

The policy’s id.

string format: uuid
topic
required

The policy’s topic.

string
Example
returns
rule_text
required

The rule the assistant follows.

string
Example
Accept returns within 30 days of delivery.
conditions

The circumstances the rule applies under, which the assistant reads together with the rule text, or null.

rrf_score
required

How well the policy matches the query, the higher the better: the two rankings the search combines, by text and by meaning, fused.

number
Example
0.0327