Skip to main content
POST
Aggregate analytics events by field

Authorizations

api_key
string
header
required

Personal API key.

Path Parameters

app_id
string
required

ID of the app whose analytics to read.

Body

application/json

Request for grouped event aggregation.

event_name
string | null

Name of the event to aggregate. Omit to aggregate every event the app tracks.

Example:

"checkout_completed"

start_time
string<date-time> | null

Start of the time range. Defaults to 30 days ago.

Example:

"2026-07-03T00:00:00Z"

end_time
string<date-time> | null

End of the time range. Defaults to now.

Example:

"2026-08-02T00:00:00Z"

max_groups
integer
default:100

Maximum number of groups to return per metric, between 1 and 1000. The largest groups are kept.

Required range: 1 <= x <= 1000
Example:

10

metrics
AggregationMetric · object[]

Between 1 and 10 metrics to compute. Each one must set field, which is the field it groups by. Defaults to an event count per event name, named event_count.

Required array length: 1 - 10 elements
Example:

Response

The grouped metrics.

Response for grouped event aggregation.

event_name
string | null

The event name that was aggregated, or null when the request covered every event.

Example:

"checkout_completed"

group_count
integer
default:0

Number of entries in groups, summed across every metric.

Example:

10

totals
Totals · object

Each metric computed over the whole range without grouping, keyed by metric name.

Example:
groups
AggregationGroup · object[]

One entry per group value per metric, largest metric value first within each metric.

Example: