livqenoDocs

API ReferenceRTC

RTC API

Rooms, RTC tokens and live participants.

These are the endpoints behind every video call. Your backend calls them with the project API key, usually through @livqeno/server or swalvo (Python).

When you'd call them in a real app:

  1. Create a room when a meeting is scheduled, or the first time someone opens it (getOrCreate makes this safe when two users arrive at once).
  2. Make a token each time a user clicks "Join". One per participant, per join.
  3. List participants if your backend needs to know who is in the call right now.
  4. Close the room when the meeting is over, to remove everyone.

Your users' apps never call these. They only use the token your backend hands them to join.

SDK side: Rooms & Participants.

Endpoints

MethodPathCredential
GET/v1/roomsProject API key
POST/v1/roomsProject API key
DELETE/v1/rooms/{id}Project API key
GET/v1/rooms/{id}Project API key
GET/v1/rooms/{id}/participantsProject API key
POST/v1/rooms/{roomId}/dataProject API key
PATCH/v1/rooms/{roomId}/participants/{identity}Project API key
POST/v1/rooms/{roomId}/participants/{identity}/muteProject API key
PATCH/v1/rooms/{roomId}/participants/{identity}/permissionsProject API key
POST/v1/rooms/{roomId}/participants/{identity}/removeProject API key
GET/v1/rooms/{roomId}/recordingsProject API key
POST/v1/rooms/{roomId}/recordingsProject API key
POST/v1/rooms/{roomId}/rtc-tokensProject API key
DELETE/v1/rooms/{roomId}/rtc-tokens/{tokenId}Project API key

GET/v1/rooms

List the API key's project's active rooms

Credential Project API key

No parameters.

POST/v1/rooms

Create a room in the API key's project

Credential Project API key · Idempotent send Idempotency-Key to replay safely

ParameterInTypeRequiredNotes
namebodystringYes1–128 chars, pattern-checked — Unique within the project (not globally). Letters, numbers, "-", "_", "." only.
getOrCreatebodybooleanNoWhen true, a name collision returns the existing room instead of a 409 — including when two
e2eebodybooleanNoEnd-to-end encrypted media (insertable streams, AES-GCM; keys never reach Livqeno). Set at create and

DELETE/v1/rooms/{id}

Close a room

Credential Project API key

ParameterInTypeRequiredNotes
idpathstringYes

GET/v1/rooms/{id}

Get a single room

Credential Project API key

ParameterInTypeRequiredNotes
idpathstringYes

GET/v1/rooms/{id}/participants

List live participants in a room, from the SFU (Phase 10 server SDK)

Credential Project API key

ParameterInTypeRequiredNotes
idpathstringYes

POST/v1/rooms/{roomId}/data

Send a data message to a room from the server

Credential Project API key

ParameterInTypeRequiredNotes
roomIdpathstringYes
payloadbodystringYesThe message bytes, base64. At most 64 KiB decoded when reliable, 1,200 bytes when not.
topicbodystringNoUp to 255 bytes. Recipients see it as the message topic.
destinationIdentitiesbodystring[]No1–∞ chars, array — Only these identities receive it (at most 64). Omit or leave empty to send to everyone.
reliablebodybooleanNotrue: the reliable, ordered channel. false: the lossy channel (latest value wins).

PATCH/v1/rooms/{roomId}/participants/{identity}

Change a connected participant's metadata or attributes

Credential Project API key

ParameterInTypeRequiredNotes
roomIdpathstringYes
identitypathstringYes
metadatabodystringNoReplaces the participant's metadata. An opaque string, at most 4 KiB.
attributesbodyRecord<string, string | null>NoMerged into the participant's attributes: a string sets the key, null deletes it, keys not named are kept.

POST/v1/rooms/{roomId}/participants/{identity}/mute

Mute or unmute a participant's track, or all their tracks of one kind

Credential Project API key

ParameterInTypeRequiredNotes
roomIdpathstringYes
identitypathstringYes
trackIdbodystringNo1–256 chars — Mute exactly this track. One of trackId or kind is required.
kindbody'audio' | 'video'Noaudio · video — Mute every track of this kind the participant is publishing. One of trackId or kind is required.
mutedbodybooleanYestrue mutes, false unmutes.

PATCH/v1/rooms/{roomId}/participants/{identity}/permissions

Change a connected participant's permissions in place

Credential Project API key

ParameterInTypeRequiredNotes
roomIdpathstringYes
identitypathstringYes
subscribebodybooleanNoLosing it drops every track the participant is receiving.
publishbodybooleanNoTurning publish on with neither publishAudio, publishVideo nor publishScreen named, for a
publishAudiobodybooleanNoHas no effect without publish.
publishVideobodybooleanNoCamera video. Has no effect without publish. Independent of publishScreen.
publishScreenbodybooleanNoScreen-share. Has no effect without publish. Independent of publishVideo.
publishDatabodybooleanNoData-channel messages.
updateOwnMetadatabodybooleanNoMay change its own metadata and attributes from the client (participant.update).

POST/v1/rooms/{roomId}/participants/{identity}/remove

Remove a participant from a live room

Credential Project API key

ParameterInTypeRequiredNotes
roomIdpathstringYes
identitypathstringYes

GET/v1/rooms/{roomId}/recordings

A room's recordings, newest first

Credential Project API key

ParameterInTypeRequiredNotes
roomIdpathstringYes

POST/v1/rooms/{roomId}/recordings

Start recording a room (composite grid; HLS and/or MP4)

Credential Project API key

ParameterInTypeRequiredNotes
roomIdpathstringYes
modebody'COMPOSITE' | 'TRACK'NoCOMPOSITE · TRACK
layoutbody'grid'Nogrid
outputsbodyRecordingOutputsDtoNoBoth outputs are on by default (hls and mp4).
storagebody'livqeno' | 'custom'Nolivqeno · custom — Defaults to custom when a recording bucket is configured.

POST/v1/rooms/{roomId}/rtc-tokens

Mint a short-lived RTC access token for a participant to join this room

Credential Project API key · Rate limit 60 per window (details) · Idempotent send Idempotency-Key to replay safely

ParameterInTypeRequiredNotes
roomIdpathstringYes
participantIdentitybodystringYes1–128 chars, pattern-checked — Unique within the room. Letters, numbers, "-", "_", "." only.
permissionsbodyRtcTokenPermissionsDtoNo
ttlSecondsbodynumberNo30–21600 — Token lifetime in seconds. Defaults to RTC_TOKEN_DEFAULT_TTL_SECONDS. There is no way to request a non-expiring token — every RTC token is short-lived by design.
regionbodystringNo0–64 chars, pattern-checked — The participant's region, if your backend knows it. Must be one of the deployment's regions. Puts the
metadatabodystringNo0–4096 chars — The participant's initial metadata: an opaque string, at most 4 KiB (UTF-8 bytes). Signed into the token
attributesbodyRecord<string, string>NoThe participant's initial attributes: string keys to string values, at most 32 keys, keys up to 64

DELETE/v1/rooms/{roomId}/rtc-tokens/{tokenId}

Revoke a minted RTC token before it expires

Credential Project API key · Rate limit 60 per window (details)

ParameterInTypeRequiredNotes
tokenIdpathstringYes
roomIdpathstringYes

Nested objects

RecordingOutputsDto

FieldTypeRequiredNotes
hlsbooleanNo
mp4booleanNo

RtcTokenPermissionsDto

FieldTypeRequiredNotes
joinbooleanNoAllowed to join the room at all Default true.
subscribebooleanNoAllowed to subscribe to other participants' tracks Default true.
publishbooleanNoAllowed to publish any track at all Default false.
publishAudiobooleanNoRestricts publish to audio (microphone) — only meaningful when publish=true Default false.
publishVideobooleanNoRestricts publish to video (camera) — only meaningful when publish=true Default false.
publishScreenbooleanNoRestricts publish to screen-share — only meaningful when publish=true. Independent of Default false.
publishDatabooleanNoAllowed to send/receive WebRTC data channel messages Default false.
updateOwnMetadatabooleanNoAllowed to change its own metadata and attributes from the client (participant.update). Default false.

Next steps