Senso
Sign inSign up

How do I query only specific documents?

A query accepts a list of content ids and will only consider those documents. Useful when you already know which policy or contract the answer must come from and want to rule out everything else.

To find documents by what they are about, query in content mode first, then restrict a second query to the ids it returned.

bash
curl -X POST https://apiv2.senso.ai/api/v1/org/search \
  -H "X-API-Key: $SENSO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "query": "what does the policy say about cancellation",
        "content_ids": ["8f14e45f-ceea-467a-9c2b-1b2f8d3a1c7e"],
        "require_scoped_ids": true
      }'

Call it

POST/org/searchOpen in API reference →Pass content_ids to restrict the search.