Mutes or unmutes a participant’s published track.
Access is authorized via metadata.auth_id check.
state - Shared application state containing LiveKit configurationauth - Authentication context from middlewarerequest - Request with room name, participant identity, track_sid, and muted stateResponse - JSON response with mute status or errorauth.id is present: Requires room.metadata.auth_id == auth.idauth.id is absent: Access is allowed (backward-compatible mode)metadata.auth_id check.
| Mode | Behavior |
|---|---|
Authenticated (auth.id present) | Requires room.metadata.auth_id == auth.id. |
Unauthenticated (auth.id absent) | Access is allowed (backward-compatible mode). |
room_name - The LiveKit room where the participant is connectedparticipant_identity - The identity of the participant whose track to mutetrack_sid - The session ID of the track to mute/unmutemuted - true to mute, false to unmute| Status | Condition |
|---|---|
400 Bad Request | Empty required fields in request. |
404 Not Found | Room/participant not found or access denied (masked for security). |
500 Internal Server Error | LiveKit not configured or mute operation failed. |
JWT token obtained from the authentication service. Required when AUTH_REQUIRED is enabled.
Request body for muting/unmuting a participant's track
{
"room_name": "conversation-room-123",
"participant_identity": "user-alice-456",
"track_sid": "TR_abc123",
"muted": true
}True to mute, false to unmute
true
The identity of the participant whose track to mute
"user-alice-456"
The LiveKit room name where the participant is connected
"conversation-room-123"
The session ID of the track to mute/unmute
"TR_abc123"
Track muted/unmuted successfully
Response for a successful mute/unmute operation
{
"room_name": "conversation-room-123",
"participant_identity": "user-alice-456",
"track_sid": "TR_abc123",
"muted": true
}