Quality API: Correlating CSAT survey responses with interaction IDs returns empty data

Trying to build a report that links CSAT survey scores back to the specific voice interaction IDs. The goal is to see which agents got low scores on calls where the call duration was under 30 seconds.

I’m using the Quality API to pull the survey data. The endpoint is POST /api/v2/quality/surveys/details/query. I have the survey ID and I’m filtering by the completion date range.

Here is the query body I’m sending:

{
 "query": {
 "filter": {
 "field": "surveyId",
 "operator": "equals",
 "values": ["12345678-abcd-1234-abcd-1234567890ab"]
 },
 "range": {
 "field": "completedAt",
 "from": "2023-10-01T00:00:00Z",
 "to": "2023-10-31T23:59:59Z"
 }
 },
 "groupBy": [],
 "aggregations": [],
 "sorts": [],
 "size": 100
}

The response comes back with 200 OK. The data array has 500 entries. Each entry has a surveyId, completedAt, and overallRating. But there is no interactionId or conversationId field in the response object. I need that ID to join this data with the conversation analytics.

I checked the API docs for /api/v2/quality/surveys/details. It says the response includes interactionId. My response does not.

I tried adding interactionId to the groupBy array. The API returned 400 Bad Request with "message": "Field 'interactionId' is not a valid groupBy field for this resource type."

Is there a different endpoint? Or do I need to use the surveyResponseId to look up the interaction in a separate call? I have the surveyResponseId in the response. Maybe I can use that to hit /api/v2/quality/surveys/{surveyId}/responses/{responseId}?

Tried that. It returns the detailed response object. Still no interactionId. It has contactId which is the participant ID. I can use that to query the conversations API, but that means 500 additional API calls for every batch. That seems inefficient.

Anyone know how to get the interaction ID directly in the bulk query?