Muting agent microphone via Genesys Cloud JavaScript SDK

Is there a clean way to mute or unmute an agent’s microphone programmatically using the Genesys Cloud JavaScript SDK during an active voice call?

I am building a security automation layer that needs to enforce audio silence based on external risk signals. I have the interactionId and participantId from the webhook payload, but I cannot find a direct method in the Call object or the InteractionsApi to toggle the mute state.

I attempted to use the PATCH endpoint for attributes, but it seems to only handle metadata, not media control. I also tried calling call.mute() on the local participant, but that only mutes the local client, not the agent’s stream in the conference.

Here is my current attempt using the SDK:

const interactions = platformClient.interactions;
await interactions.patchInteractionsAttributes(interactionId, {
 attributes: {
 muted: true
 }
});

This returns a 200 OK but the agent’s audio is not muted on the other end. Is there a specific REST API call or SDK method I am missing to control the media stream for a remote participant?

This is caused by treating the Call object as a stateful controller. The SDK is primarily for UI rendering, so direct mutation methods are often missing or deprecated in favor of REST calls.

use InteractionsApi with updateConversationParticipant. send a PATCH to /api/v2/conversations/voice/{id}/participants/{pid} with {"mute": true}. this bypasses SDK limitations and enforces the state server-side.