Hey folks,
I’m trying to programmatically transfer an active voice call to a different queue using the Genesys Cloud API. I need this for a WFM adherence check where agents are overloaded, and we want to auto-route overflow to a secondary queue without touching the Architect flow manually.
I’m using Python with the genesyscloud SDK. I can fetch the conversation details fine, but when I try to PATCH the conversation to change the target queue, I keep getting a 409 Conflict error.
Here’s the endpoint I’m hitting:
PATCH https://api.mypurecloud.com/api/v2/conversations/voice/{conversationId}
And here’s the JSON payload I’m sending in the body:
{
"target": {
"id": "new-queue-id-here",
"type": "queue"
}
}
The response I get back is:
{
"code": "conflict",
"message": "The request could not be completed because the resource is in an invalid state."
}
I’ve checked the conversationId and it’s definitely valid and the call is in ‘connected’ status. I also verified that the new-queue-id exists and has members. I’m using a user-to-user OAuth token with the admin:conversation scope, so permissions shouldn’t be the issue.
Is there a specific field I’m missing in the PATCH body? Or is this the wrong endpoint for transferring an active call to a queue? I looked at the documentation for transfer but it seems to be for point-to-point transfers, not queue re-routes.
Any pointers would be appreciated.