Trying to programmatically transfer an active voice call to a different queue using the Conversations API. The goal is to move the call from the current interaction to a new routing queue without hanging up.
I’m using a to trigger the REST proxy. The authentication part works fine since I can successfully GET the conversation details. The issue is with the PATCH request.
Here is the JSON payload I’m sending to /api/v2/conversations/voice/{conversationId}:
{
"action": "transfer",
"to": {
"targetType": "queue",
"targetId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"reason": "transfer_reason_code"
}
}
The API returns a 400 Bad Request. The error body says Invalid request body. I’ve double checked the targetId and it matches the queue ID in the UI. The conversation ID is definitely correct.
I’ve tried:
- Removing the
reasonfield. Same error. - Using
transferTypeinstead ofto. The docs are a bit vague on this for voice. - Checking if the user token has the
callcenter:transferpermission. It does.
Is the payload structure different for voice conversations compared to chat? The documentation examples seem to mix them up. What is the exact JSON structure required for a voice queue transfer via PATCH?