REST endpoints
Mute LiveKit participant
Mutes or unmutes a participant’s published track.
Access is authorized via metadata.auth_id check.
Arguments
state- Shared application state containing LiveKit configurationauth- Authentication context from middlewarerequest- Request with room name, participant identity, track_sid, and muted state
Returns
Response- JSON response with mute status or error
Authorization
- When
auth.idis present: Requiresroom.metadata.auth_id == auth.id - When
auth.idis absent: Access is allowed (backward-compatible mode)
Errors
- 400 Bad Request - Empty fields in request
- 404 Not Found - Room/participant not found or access denied (masked)
- 500 Internal Server Error - LiveKit not configured or mute operation failed
POST
Handler for POST /livekit/participant/mute endpoint
Mutes or unmutes a participant’s published track. Access is authorized via
metadata.auth_id check.
Authorization
Room names are used exactly as provided. No prefixing or modification is applied.
Request
Requires: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-trueto mute,falseto unmute
Error responses
Authorizations
Authentication token for protected endpoints. Can be provided as Authorization: Bearer <token> or ?api_key=<token>. Required when AUTH_REQUIRED is enabled.
Body
application/json
Request body for muting/unmuting a participant's track
Example
True to mute, false to unmute
Example:
true
The identity of the participant whose track to mute
Example:
"user-alice-456"
The LiveKit room name where the participant is connected
Example:
"conversation-room-123"
The session ID of the track to mute/unmute
Example:
"TR_abc123"
Response
Track muted/unmuted successfully
Response for a successful mute/unmute operation
Example
Handler for POST /livekit/participant/mute endpoint