Hey folks,
Trying to build a custom interval report for call volume using the Analytics Conversations Aggregates API. I’m hitting /api/v2/analytics/conversations/aggregates with a POST request, but the buckets array in the response is always empty, even though I know there’s data for that time range.
Here’s the payload I’m sending:
{
"timeGrouping": "INTERVAL",
"interval": "PT1H",
"dateFrom": "2023-10-01T00:00:00.000Z",
"dateTo": "2023-10-01T23:59:59.000Z",
"metrics": [
{
"type": "SUM",
"metricName": "duration"
}
],
"groupBy": ["direction"],
"queryType": "ROUTED"
}
The request returns a 200 OK, no errors in the response body, just empty buckets. I’ve double-checked the timestamps and they look fine. Is there a specific metric I’m missing or a filter I need to add to get actual data back? Also, if I want to group by queue instead of direction, do I just change the groupBy array to ["queue"] or is there more to it?
Appreciate the help.