Toggle mute state via WebSDK during active conversation

Trying to add a mute button to our custom softphone wrapper. The call connects fine but the mute logic is throwing a wrench in the works.

const conversationId = event.data.conversationId;
try {
 await platformClient.conversations.conversationsParticipants.updateConversationParticipant(
 conversationId,
 'self',
 { muted: true }
 );
} catch (err) {
 console.error('Mute failed:', err);
}

The docs mention updateConversationParticipant but I’m getting a 405 Method Not Allowed. Switched to the REST endpoint directly just to test.

PUT /api/v2/conversations/{conversationId}/participants/self
{ "muted": true }

Still hitting 405. The error body just says Method Not Allowed. The call is definitely active and I can hear the agent. Token looks valid, scopes include conversation:write. Maybe the SDK is wrapping the wrong verb? Or is there a specific flag needed for the client side? The agent UI shows the mute icon greyed out even after the request fires. Frustrating because the standard widget handles this without any issues.

Tried adding muted: true to the initial updateConversationParticipant body during the connect phase too. Nothing. Even tried the conversations/conversations/{id}/participants/{id} path directly. Same 405. It feels like the endpoint expects a different shape or maybe a query param I’m missing. The logs show the request going out with the right headers. Just need the raw API call that actually works.

That REST call is fighting against the media stream. You need to use the WebSDK’s conversation.mute() method instead. It handles the local audio track suppression immediately without waiting for the server. Just grab the active conversation object from the event and call mute on it.