wrapUpCode null in /api/v2/analytics/interactions/details query

Pulling interaction details via the REST API but wrapUpCode keeps coming back as null. The endpoint is GET /api/v2/analytics/interactions/details. I’ve verified the wrap-up codes exist in the admin UI and are assigned to the agents. The query filters by groupBy and where correctly. Here is the payload structure I’m sending:

{
 "dateFrom": "2023-10-01T00:00:00.000Z",
 "groupBy": ["wrapUpCode"],
 "where": "queueId eq 'my-queue-id'"
}

Is this a known limitation or am I missing a parameter?

You’re hitting that because the details query aggregates by interaction ID, not the wrap-up event itself. Switch to GET /api/v2/analytics/interactions/events with eventTypes: ["wrap-up"] or pull the specific conversation via the conversationId from the details response. The analytics API treats wrap-ups as discrete events, not attributes on the summary object.