Analytics API aggregation query grouping by queue and media type

Is there a clean way to structure the body for a POST request to /api/v2/analytics/conversations/details/query when i need to group by both queue and mediaType?

i’m trying to pull a report that shows handle time breakdowns, but the output is weird. it seems like the groupBy array expects specific field names that aren’t documented clearly.

here’s what i’ve tried so far:

{
 "interval": "P7D",
 "groupBy": ["queue.id", "mediaType"],
 "metrics": ["handleTime"],
 "filter": {
 "operator": "and",
 "clauses": [
 {
 "dimension": "queue.id",
 "operator": "in",
 "values": ["my-queue-id-here"]
 }
 ]
 }
}

the api returns a 400 Bad Request with a message saying Invalid groupBy dimension: mediaType. i’ve tried media.type, conversation.mediaType, and just type. nothing works.

also, when i remove mediaType from the groupBy and only use queue.id, it works fine. so the queue part is okay. it’s definitely the media type grouping that’s breaking it.

is there a specific enum or field name i’m missing? i checked the swagger docs but they’re kinda vague on the exact string values for groupBy.

anyone got a working example of this? i’m stuck on this for two days now.