Muting agent mic via Genesys Cloud JS SDK

Looking for advice on muting an agent’s microphone during an active call using the Genesys Cloud JavaScript SDK. I’m calling client.interactionApi.interactionInteractionUpdateInteraction but the mic stays on. The payload looks right to me.

const payload = {
 type: 'interaction',
 actions: [{ type: 'mute', target: 'audio' }]
};
await client.interactionApi.interactionInteractionUpdateInteraction(interactionId, payload);

No errors thrown, but nothing happens. What’s the correct payload structure for this endpoint?

The problem is that interactionInteractionUpdateInteraction isn’t the right endpoint for real-time audio controls. You’ll need to use the Conversations API instead to actually mute the participant’s audio stream during the call.

await client.conversationsApi.conversationsParticipantPutAudio(
 conversationId, 
 participantId, 
 { muted: true }
);

Just make sure you have the conversation:write scope enabled on your token.