Genesys Cloud JS SDK: Muting local participant returns 400 Bad Request during active call

Running into a weird issue with the @genesyscloud/conversations-api JS SDK (v15.2.0). I’m trying to programmatically mute the local agent’s microphone during an active call session.

The call is established, status is connected, and I can see the participantId in the console. I’m grabbing the participant ID from the getParticipant response and hitting the mute endpoint directly because the SDK wrapper for mute seemed flaky in previous versions.

Here’s the call:

const participantId = 'some-uuid-from-active-call';
const payload = {
 muted: true,
 reason: 'Agent requested mute'
};

await client.conversationsApi.updateConversationParticipantMute(
 conversationId,
 participantId,
 payload
);

Getting a 400 Bad Request back. The error body is:

{
 "errors": [
 {
 "code": "bad_request",
 "message": "Mute state update failed. Participant is not in a valid state for this operation."
 }
 ]
}

I’ve checked the participant state and it’s connected. No other actions are pending. Is there a race condition I’m missing here? Or does the JS SDK require a specific sequence of events before allowing a mute toggle? I’ve tried adding a 500ms delay after the call connects, but same result.

Anyone else hit this wall with the JS SDK mute API?