Stuck on the transfer logic for our custom ECA widget. Need to drop a call into a specific queue programmatically. The docs show transferTo with a target object, but the payload keeps getting rejected.
Here’s the call I’m firing:
const payload = {
transferTo: {
target: {
id: 'queue-id-here', // Verified this ID exists
type: 'queue'
},
transferType: 'consult'
}
};
await client.platformClient.conversations.updateVoiceConversation(
conversationId,
payload
);
Returns a 400 Bad Request. The error body is vague:
{
"errors": [
{
"code": "bad_request",
"message": "Invalid transfer target or type"
}
]
}
Tried transferType: 'blind' as well. Same result. Checked the queue ID three times. It’s definitely valid. Also tried adding routingData with empty skill set, didn’t help.
Is the type field supposed to be lowercase? Docs aren’t clear on casing sensitivity. Or is there a specific permission required on the OAuth token scope that isn’t listed? We’re using conversations:write and conversations:view.
Also noticed if I omit transferType, it defaults to blind but still fails. Feels like the API expects something else in the target object. Maybe a name field? Unlikely since we have the ID.
Anyone got a working snippet for this? Would appreciate a paste of the exact JSON that hits the mark. Tearing my hair out over this one. It works fine in the native desktop app, so the queue config is fine. Must be the payload structure.