Genesys Cloud JS SDK: How to mute/unmute agent mic during active call?

Hey folks,

I’m trying to build a custom softphone widget using the Genesys Cloud JavaScript SDK (@genesyscloud/-platform-client-apis). We need a button in our UI that lets agents mute or unmute their microphone during an active conversation.

I can’t seem to find a direct method like conversation.mute() in the docs. I see methods for creating conversations, but controlling the audio state feels like it should be in the Client or Conversation object.

Here’s what I’ve tried so far:

const client = new PlatformClientV2.ApiClient();
const conversationApi = new PlatformClientV2.ConversationsApi(client);

// Attempting to mute
await conversationApi.postConversationParticipant({
 conversationId: 'current-call-id',
 body: {
 mute: true
 }
});

This returns a 400 Bad Request saying the payload is invalid. I’m guessing I’m missing the participant ID or using the wrong endpoint structure.

Has anyone successfully implemented mute/unmute functionality with the JS SDK? Is there a specific method I should be calling on the active call object instead of hitting the REST API directly?