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.

assignees
string<email>[]

Optional. Narrow Data sources (data:<id>) to the records these users would see in the Data list: per user, the records of the user's hubs (every hub for a data type shared by every hub, or for a user with no hub) and, on a data type limited to some users, the records restricted to that user or to everyone. Users are OR-ed: a record counts when any of them would see it. Always AND-ed with the caller's own visibility, so it never widens what the caller sees. Emails are matched exactly; duplicates are ignored, and a deleted or unknown user adds nothing, so a Data item whose users all fall away returns no rows. Every other source ignores it (Task sources are narrowed with an assignee filter in the spec). Omitted, null or [] = no narrowing. Not a list of emails = 422 assignees_invalid. When the users cannot be read, each Data item fails alone with assignee_scope_unresolved and the other items still run.

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[]