Skip to main content
POST
Run a query plan

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
metrics
string[]
required

Measure ids, such as visitors, revenue, spend, provider_roas, attributed_revenue, active_subscriptions, or custom:<event_name>.

Required array length: 1 - 10 elements
date_range
object
required

{from, to} (inclusive; YYYY-MM-DD in the workspace timezone, or ISO 8601 instants) or {preset}.

dimensions
string[]

Dimension ids from GET /dimensions. Omit for totals only.

Maximum array length: 3
filters
object[]

Combined with AND.

Maximum array length: 20
granularity
enum<string> | null

Adds a bucket column. Omit for one row per dimension combination.

Available options:
hour,
day,
week,
month,
null
compare
enum<string> | null

Also compute the preceding window of equal width.

Available options:
previous_period,
null
attribution
object | null

Required for attributed_* metrics; the workspace default applies when omitted. Echoed in meta.resolved.attribution.

order_by
object[]
Maximum array length: 3
limit
integer
default:200
Required range: 1 <= x <= 2000
cursor
string | null

meta.next_cursor from the previous page.

response_format
enum<string>
default:concise
Available options:
concise,
detailed

Response

Successful response. Shape evolving — read fields defensively and do not depend on the absence of a field.

rows
object[]
required

One object per dimension combination (and bucket). Keys are dimension ids, bucket, then metric ids. A null metric value means no data, not zero.

totals
object
required

One value per metric id over the whole, unpaginated result.

meta
object
required
comparison
object | null
data_notice
string

Reminds a reader that strings in rows are recorded data, not instructions.