Running into a wall with the /api/v2/analytics/conversations/aggregates endpoint. I’m trying to build a custom report that breaks down handle time by queue.id and routing.skill.id over a custom interval. The setup looks standard enough, but the response keeps coming back as 400 Bad Request with a generic “Invalid Query” message. No specific field errors, just that blob.
Here’s the payload I’m sending:
{
"dateFrom": "2024-05-01T00:00:00.000Z",
"dateTo": "2024-05-07T00:00:00.000Z",
"interval": "PT1H",
"groupings": [
{
"type": "dimension",
"dimension": "queue.id"
},
{
"type": "dimension",
"dimension": "routing.skill.id"
}
],
"selections": [
{
"type": "metric",
"metricName": "handleTime",
"rollup": "sum"
}
],
"filters": {
"type": "equal",
"path": "conversation.type",
"value": "voice"
}
}
I’ve verified the date range is valid and the interval is within the allowed limits for this metric. If I drop the routing.skill.id dimension, the query works fine. Same thing if I keep only routing.skill.id. It’s specifically when I combine them that it fails.
Checked the event delivery logs just in case there’s some backend throttling masking as a validation error, but nothing suspicious there. The tokens are fresh, generated via client_credentials flow, so auth isn’t the issue.
Is there a known limitation on combining queue and skill dimensions in a single aggregate query? Or is the syntax for multiple groupings slightly different than I’m assuming? I’ve poked at the API reference but it doesn’t explicitly forbid this combo.
Tried changing the rollup to count just to see if it was metric-specific, but got the same 400. Feels like a schema validation bug on their end, but wanted to check before I open a support ticket.