Skip to main content
POST
Run analytics query

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Body

application/json

Batch of up to 12 queries

queries
object[]
required
Required array length: 1 - 12 elements
timeRange
object

Either preset, or both from and to as calendar dates YYYY-MM-DD (anything else, including 2026-02-30, relative words and datetimes, is 422 time_range_invalid), widened to whole days on the batch utcOffset. Maximum 31 days, inclusive.

hubIds
string[]

Narrow to these hubs: a list of 24-character hex hub ids (anything else is 422 hub_ids_invalid), each one of the caller's hubs (otherwise 403 hub_not_allowed). Omitted or [] = every hub the caller belongs to; a caller with no hub sees no rows.

utcOffset
string

Optional. The UTC offset (±HH:MM) day boundaries, dateHistogram buckets and the hourOfDay/dayOfWeek buckets are cut on. Absent = the organization calendar (Asia/Jakarta, +07:00). Anything else is 422 utc_offset_invalid.

Pattern: ^[+-]\d{2}:\d{2}$
Example:

"+07:00"

mode
enum<string>

Request the compiled engine query (internal accounts only; ignored otherwise)

Available options:
debug
specVersion
integer

Accepted at batch level; the spec-level value is the one validated

Response

Success - one result per item, in request order. Individual items can still be error, timeout, no_data or no_permission. In the example, the hour-of-day item shows only its first 3 rows; the API returns all 24 (0-23, on utcOffset +07:00). The Data source card (...D3N) counts all records of the data type, whatever the time range, and its dimension column carries the field title. The Routing Result card (...D3Q) sums dropped visits per hub and carries valueLabels.hub with the hub names. The last item is a Users card: it counts the organization's users by account status, whatever the time range; because it groups, the caller needs view/user as well, or the item is no_permission with data_source_forbidden. Status values are active, pending, disable, reject, inactive and unverified, returned as stored.

status
boolean
Example:

true

specVersion
integer
Example:

1

resolvedTimeRange
object
results
object[]