v1

latestOpenAPI 3.1.0Apache-2.02026-07-17144068.3 KB
livekit

Handler for POST /livekit/participant/mute endpoint

Mutes or unmutes a participant's published track. Access is authorized via metadata.auth_id check.

Arguments

  • state - Shared application state containing LiveKit configuration
  • auth - Authentication context from middleware
  • request - Request with room name, participant identity, track_sid, and muted state

Returns

  • Response - JSON response with mute status or error

Authorization

  • When auth.id is present: Requires room.metadata.auth_id == auth.id
  • When auth.id is 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/livekit/participant/mute

Request body

mutedboolean required

True to mute, false to unmute

participant_identitystring required

The identity of the participant whose track to mute

room_namestring required

The LiveKit room name where the participant is connected

track_sidstring required

The session ID of the track to mute/unmute

Example request

{
  "muted": true,
  "participant_identity": "user-alice-456",
  "room_name": "conversation-room-123",
  "track_sid": "TR_abc123"
}

Response

Track muted/unmuted successfully

mutedboolean required

Current muted state

participant_identitystring required

The identity of the participant

room_namestring required

The room name

track_sidstring required

The session ID of the track

Example response

{
  "muted": true,
  "participant_identity": "user-alice-456",
  "room_name": "conversation-room-123",
  "track_sid": "TR_abc123"
}