Skip to main content
POST
Run a saved document query
This endpoint runs the saved query directly, without a separate lookup step. To modify a query before running it, see the Running document queries with APIs guide.

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

documentId
string
required

Document identifier (either document ID or identifier slug)

Example:

"abc123"

queryId
string
required

The saved query to run: its queryIdentifierMapKey, or its query presentation id, from GET /api/v1/documents/{identifier}/queries.

Minimum string length: 1
Example:

"1"

Query Parameters

userId
string<uuid>

Organization API key required. The membership ID of the user to act as.

Body

application/json
formatResults
boolean
default:true

Whether to format result values (e.g., apply number formatting). Defaults to true.

resultType
enum<string>
default:json

Format of the result document. For csv and xlsx results formats, the document's Download setting must be enabled.

Available options:
csv,
xlsx,
json
Example:

"json"

Response

The saved query ran; the body is its result document.

{key}