Trying to programmatically transfer an active voice call to a different queue using the Conversations API. I’m hitting a wall with the PATCH endpoint. The docs suggest I can swap out the to object, but I’m getting a 400 Bad Request every time.
Here’s the JSON body I’m sending to PATCH /api/v2/conversations/voice/{conversationId}:
{
"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 calling GET /api/v2/queues/{id} 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?