PATCH /api/v2/conversations/voice/participants transferTo queueId returns 400 Bad Request

I’m trying to transfer an active voice conversation to a specific queue programmatically using the Node.js SDK (genesys-cloud-nodejs-client). The docs say I can use POST /api/v2/conversations/{conversationId}/participants/{participantId}/replace/queue with a queue ID in the body.

Here’s the code I’m running:

const participantId = 'some-participant-id';
const conversationId = 'some-conversation-id';

const body = {
 id: 'my-queue-id-123'
};

try {
 const response = await apiInstance.postConversationParticipantReplaceQueue(
 conversationId,
 participantId,
 body
 );
 console.log('Transfer initiated:', response);
} catch (error) {
 console.error('Error:', error.response.status, error.response.data);
}

The request throws a 400 Bad Request. The error payload looks like this:

{
 "message": "Validation failed",
 "errors": [
 {
 "message": "id is required"
 }
 ]
}

I’m passing the ID explicitly. I’ve double-checked that my-queue-id-123 exists and is active. I’ve also tried passing just the object without the id field, but that gives a different validation error saying id is required.

Is there a specific format for the id that I’m missing? Or does this endpoint actually not support queue transfers directly and I need to hit the routing API first? The SDK method seems to imply it should work.

1 Like