Terraform module that provisions Genesys Cloud interactions, but I have hit a roadblock with the Conversations API. The requirement is to programmatically transfer an active voice interaction to a different queue using a PATCH request to /api/v2/interactions/{id}.
The documentation suggests that the routing object within the interaction details should handle this. I have constructed the following JSON payload for the request body:
{
"routing": {
"queueId": "new-queue-id-12345",
"skill": "general-support",
"reasonCode": "transfer"
}
}
When I execute this via Postman or a custom Python script using the requests library, I consistently receive a 400 Bad Request response. The error message in the body is somewhat generic: Invalid input: routing.queueId. This is confusing because I have verified that the queueId exists and is accessible by the user making the request.
I have also tried including the priority and wrapUpCode fields, but the result remains unchanged. It appears that the API might be rejecting the transfer attempt because the interaction is currently in a connected state, or perhaps the routing object requires additional fields that are not explicitly documented for transfer scenarios.
Has anyone successfully implemented a programmatic queue transfer using the PATCH method? If so, what is the exact structure of the routing object required? I am specifically looking for the correct way to specify the target queue without triggering a validation error. The standard transferTo endpoint seems to be deprecated in favor of this interaction-based approach, but the implementation details are unclear. I need to ensure that the transfer is logged correctly in the interaction history as well. Any insights would be appreciated.