We’re trying to implement a programmatic call transfer in our Kotlin Android wrapper. The goal is to transfer an active voice conversation to a specific queue using the Conversations API. We’ve got the OAuth token handling sorted, and we can retrieve the conversation details fine via GET.
Here’s the payload we’re sending to PATCH /api/v2/conversations/voice/{conversationId}:
{
"to": {
"targetAddress": "queue:12345678-1234-1234-1234-123456789012",
"targetType": "queue"
}
}
The response is consistently a 400 Bad Request with this error body:
{
"code": "badRequest",
"message": "Validation failed",
"details": [
{
"code": "invalid",
"message": "Invalid transfer target",
"path": ".to.targetAddress"
}
]
}
I’ve verified the queue ID is correct by checking the Admin UI and the REST API explorer. The conversation state is connected. I’m using the standard bearer token authentication. Is there a specific permission required on the API key besides conversation:read and conversation:write? Or is the targetAddress format different when initiating from a mobile SDK context versus a pure backend call?
We’ve also tried using agent as the targetType with a user ID, which works, but we need queue transfers. Stuck on this validation error.