Run a report query
Executes an ad-hoc reporting query: one metric + aggregation over a date range, with optional filters, grouping, segmentation and period-over-period comparison.
Building a query
- Pick a
metricandaggregationfrom the datasets catalog (GET /v2/reports/datasets). Counts usecount; duration metrics supportsum,avg,median,min,max,rangeandpercentile(passpercentile: 95for p95); rate metrics usevalue. - Set the reporting window with
startDate/endDate(ISO 8601) and agranularity(hour,day,week,month) for the returned time series. Reporting data is available from July 14, 2026. Windows ending earlier are rejected; crossing windows are clamped to that boundary in the requested timezone. - Optionally narrow with
filters— a rule ({ "kind": "rule", "fieldId": "...", "operator": "in", "value": [...] }) or anand/orgroup of rules. Attribute IDs and allowed operators come from the catalog. - Optionally break results down with
groupBy(primary dimension) andsegmentBy(secondary dimension). - Optionally pass
compareStartDate/compareEndDateto getpreviousValue/deltaPercentalongside every data point.
Top-N and Show Other
For high-cardinality breakdowns, cap the number of returned series:
topValuesLimitkeeps only the top NgroupByvalues;segmentTopValuesLimitdoes the same forsegmentBy. Both accept integers from 1 to 100; the editor offers common presets plus a Custom value.topValuesLimitrequiresgroupBy;segmentTopValuesLimitrequiressegmentBy.- For time-series segment breakdowns, members are ranked inside each time bucket. The response keeps the union of those bucket winners in its series catalog, while a member outside a bucket's Top N has a zero value in that bucket. This matches the chart's per-period ranking semantics. A comparison period is folded into the primary period's union of visible members so current and previous series keep the same identities.
- For non-time-series grouped results, members are ranked over the full filtered primary range. A comparison period reuses the primary period's ranked set rather than independently changing the legend.
showOther/segmentShowOtherappend a single synthetic bucket with id__other__and labelOtherthat sums every value outside the top set. Because the values are summed, Show Other is only supported for additive aggregations (count,sum,value); it is rejected foravg,median,min,max,range,percentile, and for percentage metrics (whose ratios cannot be summed).showOtheralso requirestopValuesLimit(andsegmentShowOtherrequiressegmentTopValuesLimit). PlaintopValuesLimit(without Show Other) works with any aggregation.- The
__other__group/segment aggregates rows outside the selected top groups and cannot be drilled into (POST /v2/reports/drill-inrejectsdataPointFilters.groupValue/segmentValueequal to__other__).
Example
{
"metric": "new_conversations",
"aggregation": "count",
"startDate": "2026-07-14",
"endDate": "2026-07-15",
"granularity": "day",
"groupBy": "conversation.channel",
"filters": {
"kind": "rule",
"fieldId": "conversation.state",
"operator": "is",
"value": "closed"
}
}Response shape
value— the aggregate across the whole windowtimeSeries— one datum per granularity bucketgroupedData/segmentData— present whengroupBy/segmentBywere requestedflowData— present forview: "sankey"(Overview conversation-flow metrics)meta— echo of the resolved metric, dataset, unit and aggregation
Special views
view: "hourly_heatmap"buckets by day-of-week × hour-of-day (use with volume metrics)view: "sankey"returns conversation flow edges (Overview metrics only)
Version Availability
This endpoint is only available in API version 2026-01-01.nova and newer, and only for workspaces with the Reports product enabled (404 otherwise).
Body
Aggregation function applied to the metric. Each metric supports a subset of aggregations — see the allowedAggregations field in the GET /v2/reports/datasets catalog.
count, sum, avg, median, min, max, range, percentile, valuecountEnd of the comparison window. Must be paired with compareStartDate.
10 - 64Start of the comparison window for period-over-period deltas. Must be paired with compareEndDate.
10 - 64End of the reporting window (ISO 8601 date or datetime, inclusive). Windows ending before 2026-07-14 are rejected.
10 - 642026-07-15Filter expression: a single rule, or an and/or group combining rules and nested groups. Attribute IDs and their allowed operators come from GET /v2/reports/datasets.
Time bucket size for the returned time series.
hour, day, week, monthdayAttribute ID to group results by (e.g. conversation.channel). See supportsGroupBy in the catalog.
512conversation.channelMetric ID to query (e.g. new_conversations). Discover metric IDs via GET /v2/reports/datasets.
1 - 128new_conversationsRestrict time-based metrics to configured office hours. Only supported by some metrics (see supportsOfficeHours in the catalog).
Percentile (1-100) — required when aggregation is percentile.
1 <= x <= 10095Attribute ID for secondary segmentation within each group or time bucket.
512When true, fold segmentBy values outside the top set into a synthetic __other__ / Other segment. Only supported for additive aggregations (count, sum, value) and not for percentage metrics. The __other__ segment cannot be drilled into. Requires segmentBy and segmentTopValuesLimit.
Keep only the top N segmentBy values per series. Under a time View-by, segments are ranked independently inside each time bucket and the response series catalog contains the union of bucket winners. Under a dimension View-by, ranking is applied within each retained parent group. Allowed range: 1 to 100; the editor offers common presets plus a Custom value. Requires segmentBy.
1 <= x <= 1005When true, append a single synthetic group with id __other__ and label Other that sums the values of every groupBy value outside the top set. Only supported for additive aggregations (count, sum, value) and not for percentage metrics. The __other__ group cannot be drilled into. Requires groupBy and topValuesLimit.
Start of the reporting window (ISO 8601 date or datetime, inclusive). Reporting data is available from 2026-07-14; crossing windows are clamped to that boundary.
10 - 642026-07-14IANA timezone for date bucketing (e.g. America/New_York). Defaults to UTC.
64Europe/TallinnKeep only the top N groupBy (View-by) values, ranked by the selected metric/aggregation over the full filtered primary range. Allowed range: 1 to 100; the editor offers common presets plus a Custom value. A comparison period reuses the primary period's ranked set. Requires groupBy.
1 <= x <= 10010Result shape. standard returns a time series (plus grouped/segment data when requested), hourly_heatmap buckets by day-of-week × hour-of-day, sankey returns conversation flow data. Each metric lists its supportedViews in the GET /v2/reports/datasets catalog.
standard, hourly_heatmap, sankeystandardResponse
Success