Analytics Aggregates Query returns empty results for custom interval report

Building a custom interval report using the Analytics Conversations Aggregates API. The goal is to pull conversation volume and handle time for a specific queue over a 30-day window.

Using the POST /api/v2/analytics/conversations/aggregates endpoint. I’m sending this JSON payload:

{
 "groupBy": ["queueId"],
 "interval": "30d",
 "select": ["conversation.count", "conversation.handledTime"],
 "where": [
 {
 "name": "queue.id",
 "op": "equals",
 "value": "12345678-abcd-efgh-ijkl-1234567890ab"
 }
 ],
 "dateFrom": "2023-10-01T00:00:00.000Z",
 "dateTo": "2023-10-31T23:59:59.999Z"
}

The API returns a 200 OK. No validation errors. But the entities array in the response is completely empty. hasMore is false. count is 0.

I’ve verified the queue ID is correct by hitting /api/v2/queues/{queue_id} and it returns valid data. The date range definitely has traffic. I checked the standard reports in the admin portal and data exists for this queue during this period.

Tried changing groupBy to [] to get a total count. Still empty. Tried changing interval to 1d and iterating. Same result. Empty entities.

Is there a known issue with the conversation.handledTime metric in aggregate queries? Or is the where clause syntax wrong for queue filtering in this specific endpoint? The docs are vague on the exact field names for the where object in the aggregates context versus the data export context.

Here’s the relevant part of the response:

{
 "pageSize": 200,
 "pageNumber": 1,
 "total": 0,
 "count": 0,
 "hasMore": false,
 "entities": [],
 "entitiesWithPaths": [],
 "orphanedEntities": []
}

Running this from a Python script using requests. Token is valid. Scope includes analytics:query.