Muting agent mic via Genesys Cloud JS SDK during active call session

Just noticed that the documentation for the Genesys Cloud JavaScript SDK is a bit sparse on real-time call control actions, specifically regarding muting. I am building a custom softphone interface using the @genesyscloud/webchat-widget and the underlying purecloud-platform-client library. My goal is to programmatically mute and unmute the agent’s microphone during an active voice conversation without relying on the default UI controls.

I have successfully established the connection and can retrieve the active conversation object. However, when I attempt to call the mute method, the state does not update on the remote end, nor does the local audio stream stop transmitting. Here is the relevant snippet from my TypeScript service:

import { ConversationApi, PureCloudPlatformClientV2 } from '@genesyscloud/purecloud-platform-client';

async function toggleMicMute(conversationId: string, mute: boolean) {
 const apiClient = PureCloudPlatformClientV2.ApiClient.instance;
 const conversationApi = new ConversationApi();
 
 try {
 // Attempting to update participant state
 const body = {
 mute: mute
 };
 
 await conversationApi.postConversationParticipantMute({
 conversationId: conversationId,
 body: body
 });
 console.log('Mute state updated successfully');
 } catch (error) {
 console.error('Failed to update mute state:', error);
 }
}

The API call returns a 200 OK status, but the participant object retrieved immediately after still shows "mute": false. I suspect I might be missing a specific header or perhaps the SDK method requires a different payload structure for the client-side SDK versus the REST API. Is there a specific event listener I need to hook into to confirm the mute action has propagated? Also, should I be using the ParticipantApi instead of ConversationApi for this specific action? Any insights on the correct method signature would be appreciated.