Skip to content

Moderation

RTCstack exposes LiveKit's room management via a thin REST layer. All moderation actions require moderator or host role in the originating token — the API does not enforce role-based access on these endpoints, so your backend is responsible for checking the caller's role before forwarding.

List Participants

http
GET /v1/rooms/:roomId/participants

Response:

json
{
  "participants": [
    {
      "sid": "PA_abc123",
      "identity": "user-1",
      "name": "Alice",
      "state": "ACTIVE",
      "joinedAt": "2024-04-21T10:00:00.000Z",
      "audioLevel": 0.4,
      "isSpeaking": true,
      "metadata": ""
    }
  ]
}

Mute a Participant

Mutes a specific track type for a participant. The participant is notified via LiveKit data channel.

http
POST /v1/rooms/:roomId/participants/:participantId/mute
Content-Type: application/json

{
  "trackType": "audio"
}

trackType is "audio" or "video".

Response: 204 No Content

Kick a Participant

Removes a participant from the room. They can rejoin unless your app prevents it.

http
DELETE /v1/rooms/:roomId/participants/:participantId

Response: 204 No Content

Room Management

List Rooms

http
GET /v1/rooms

Get Room

http
GET /v1/rooms/:roomId

Create Room (explicit)

http
POST /v1/rooms
Content-Type: application/json

{
  "roomId": "my-room",
  "maxParticipants": 20,
  "emptyTimeout": 300,
  "metadata": "{\"topic\":\"weekly standup\"}"
}

Rooms are created implicitly by POST /v1/token — use this endpoint only when you need to pre-configure a room before the first participant joins.

Delete Room

Terminates the room and disconnects all participants.

http
DELETE /v1/rooms/:roomId

Response: 204 No Content