Skip to main content
POST
Execute a query builder configuration
Run a query builder configuration against your extracted document data and get tabular rows back. The workspace and organization are taken from the API key, so the configuration itself carries no tenancy.

Use Cases

Reporting

Pull aggregated figures across document types for dashboards and reports

Reconciliation

Join related documents (for example purchase orders and invoices) and compare fields

Data export

Select and order specific fields for downstream systems

Validation

Filter for documents that fail a business rule

Request Parameters

Request Body

queryConfig

All properties are optional; combine the ones your query needs.

options

queryConfig mirrors the query builder in the fileAI app. The most reliable way to author one is to build the query in the UI and reuse its configuration here.

Response

A 200 response can still carry errors when the query configuration is invalid. Check errors before treating data as complete.

Idempotency

Idempotency-Key is accepted for client uniformity but ignored here: the endpoint has no side effects, and a retry can legitimately return different rows, so replaying a cached response would hand back stale data. See Idempotent requests.

Authorizations

x-api-key
string
header
required

API key for authentication

Headers

Idempotency-Key
string

Accepted for client uniformity but IGNORED on this endpoint. It has no side effects, and a retry can legitimately return different results, so replaying a cached response would hand back stale data. Every request executes fresh: no 24h window, no replay, no Idempotent-Replayed header, and no key-reuse 422.

Body

application/json
queryConfig
object
required

Query builder configuration payload

options
object

Optional execution settings such as limit and offset

Response

Query executed successfully

data
object[]
required

Rows returned by the query

headers
object
required

Headers metadata keyed by selected field aliases

executionTimeMs
number
required

Execution time in milliseconds

rowCount
number
required

Number of rows returned

errors
object[]

Validation errors when query config is invalid