Trying to transfer a voice conversation to a specific queue via PATCH. Setting toTarget to the queue ID returns 200 OK, but the call rings the agent instead of queuing. Is the payload wrong? Here’s the JSON:
{
"toTarget": {
"id": "queue-id-123",
"type": "queue"
}
}
Docs state: “The toTarget property specifies the final destination for the transfer. For queues, the type must be queue.” You’re setting that correctly. But the API doesn’t just move the call based on the ID alone. It checks the current call state and your token’s permissions first.
If the call is already in a state where transfer isn’t allowed (like if it’s ringing or already connected to an agent without a proper transfer context), the PATCH might return 200 but ignore the target because the operation isn’t valid for that state. Also, check your OAuth scopes. You need conversation:write and conversation:transfer. If you’re using client credentials, make sure the client has access to the division where the queue lives.
Here’s what usually works for a blind transfer:
curl -X PATCH "https://api.mypurecloud.com/api/v2/conversations/voice/{conversationId}" \
-H "Authorization: Bearer {accessToken}" \
-H "Content-Type: application/json" \
-d '{
"toTarget": {
"id": "queue-id-123",
"type": "queue"
}
}'
But wait. If you want to actually queue the call, you might need to use the transfer method on the conversation resource instead of just patching the target. The PATCH endpoint is for updating conversation attributes, not necessarily initiating the transfer action itself. The docs for patchConversationVoice say: “Updates the specified voice conversation.” It doesn’t explicitly say it triggers the transfer. You might be better off using the dedicated transfer endpoint:
POST /api/v2/conversations/voice/{conversationId}/transfer
That’s the one that actually moves the call. Try that instead.