PATCH /api/v2/conversations/voice/{id} transfer to queue 400 Bad Request

Trying to programmatically transfer an active voice call to a different queue using the Conversations API. I’m hitting a wall with the POST endpoint. The docs suggest I can initiate a consult transfer, but I’m getting a 400 Bad Request every time.

Here’s the JSON body I’m sending to POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/queue:

{
 "to": [
 {
 "id": "new-queue-id-here",
 "type": "queue"
 }
 ]
}

The response payload says:

{
 "message": "Invalid to address type",
 "errorCode": "bad_request"
}

I’ve verified the new-queue-id-here is valid by checking the queue details in the routing API and it returns the queue details just fine. The conversation status is connected. I’m assuming I need to include the from object as well, or maybe the type needs to be participant?

What’s the exact structure required for a programmatic transfer to a queue via this endpoint?

1 Like