Query Documents
Endpoint
POST /api/v1/query
Scoping behaviour
| Parameters provided | Scope |
|---|---|
| (none) | All completed documents in your workspace |
document_id | That document only (fastest) |
group_id | All completed documents in that group |
group_ids | All completed documents across those groups |
Request Body
application/json
Your natural-language question
Restrict the query to a single document.
Restrict the query to documents in a specific group. Cannot be combined with
document_id or group_ids.Restrict the query to documents across multiple groups. Cannot be combined with
document_id or group_id.Response
The answer to your question
The document used to answer (present only for single-document queries)
Examples
Documents must have
status=completed before they can be queried. Use the Check Ingestion Status endpoint to confirm a document is ready.