Skip to content

Rooms ​

Rooms, the participants in them, and acting on a live one.

List rooms, newest first ​

GET /v1/rooms

Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: read, 600 a minute

Parameters

NameInTypeDescription
limit?queryinteger1–100. Default 20.
cursor?querystringThe nextCursor of the previous page. 1–512 characters.
active?querystringtrue: rooms not yet ended. false: rooms that have ended. One of true, false.
name?querystring1–200 characters.
createdAfter?querystring (date-time)Created at or after this instant.
createdBefore?querystring (date-time)Created before this instant.

Response 200 — A page of rooms.

FieldTypeDescription
dataRoom[]
nextCursorstring | nullThe cursor for the next page; null on the last.

Errors

StatusCode
400validation_failed, token_ttl_too_long
401unauthenticated, token_expired, token_replayed, token_not_yet_valid
403permission_denied, app_suspended, quota_exhausted
429rate_limited
500internal

Create a room before anyone joins it ​

POST /v1/rooms

A room is otherwise created by the first join whose token carries roomCreate. Creating it here fixes its mode and metadata first. A room nobody joins ends empty after emptyTimeoutSec. Runs on a signaling node.

Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: write, 120 a minute

Request body application/json

FieldTypeDescription
name?stringUnique among live rooms; the sid when absent. 1–200 characters.
mode?stringFixed for the room's life. p2p is two seats. One of p2p, sfu. Default "sfu".
maxParticipants?integer50 unless given; a p2p room is 2. 2–100.
emptyTimeoutSec?integerHow long the room lives empty, before anyone joins and after the last leaves. 1–86400. Default 60.
departureTimeoutSec?integerHow long a dropped participant keeps its seat; 20 s in sfu, 60 s in p2p, unless given. 1–600.
metadata?objectThe tenant's own JSON, at most 4 096 bytes as UTF-8. The platform never reads it.
recordingPolicy?stringon_demand: recorded when POST /v1/rooms/{sid}/recordings asks. always: recorded from the first join, and again on a new media server if the room moves. The application's setting when absent, else off; a p2p room cannot be recorded, so anything but off is refused there. One of off, on_demand, always.
recordingRequiresConsent?booleanRecord a participant only once its client acknowledged the recording, which its user chooses to. The application's setting when absent, else false.

Response 201 — The room, as created.

FieldTypeDescription
sidstringMatches ^RM_[0-9a-f]{20}$.
namestringUnique among the tenant's live rooms; the sid when none was given.
modestringFixed for the room's life. p2p is two seats. One of p2p, sfu.
maxParticipantsinteger
emptyTimeoutSecinteger
departureTimeoutSecinteger
recordingPolicystringWhether and when a room may be recorded; fixed at the room's creation. One of off, on_demand, always.
recordingRequiresConsentbooleanA participant is recorded only once it acknowledged the recording.
metadataobjectThe tenant's own JSON, at most 4 096 bytes as UTF-8. The platform never reads it.
numParticipantsintegerSeats not yet left.
createdAtstring (date-time)
startedAtstring (date-time) | null
endedAtstring (date-time) | null
endReasonstring | nullOne of empty, api, max_duration, node_failure, quota.
participants?Participant[]On a read of one room only.

Errors

StatusCode
400validation_failed, token_ttl_too_long
401unauthenticated, token_expired, token_replayed, token_not_yet_valid
403permission_denied, app_suspended, quota_exhausted
409conflict, room_full, room_closed, duplicate_identity, already_answered
413payload_too_large
429rate_limited
500internal
503signaling_unavailable, sfu_unavailable, recording_unavailable

Read one room, with the participants in it now and their live tracks ​

GET /v1/rooms/{sid}

Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: read, 600 a minute

Parameters

NameInTypeDescription
sidpathstring

Response 200 — The room.

FieldTypeDescription
sidstringMatches ^RM_[0-9a-f]{20}$.
namestringUnique among the tenant's live rooms; the sid when none was given.
modestringFixed for the room's life. p2p is two seats. One of p2p, sfu.
maxParticipantsinteger
emptyTimeoutSecinteger
departureTimeoutSecinteger
recordingPolicystringWhether and when a room may be recorded; fixed at the room's creation. One of off, on_demand, always.
recordingRequiresConsentbooleanA participant is recorded only once it acknowledged the recording.
metadataobjectThe tenant's own JSON, at most 4 096 bytes as UTF-8. The platform never reads it.
numParticipantsintegerSeats not yet left.
createdAtstring (date-time)
startedAtstring (date-time) | null
endedAtstring (date-time) | null
endReasonstring | nullOne of empty, api, max_duration, node_failure, quota.
participantsParticipant[]On a read of one room only.

Errors

StatusCode
401unauthenticated, token_expired, token_replayed, token_not_yet_valid
403permission_denied, app_suspended, quota_exhausted
404not_found, room_not_found, identity_not_found
429rate_limited
500internal

End a room now ​

DELETE /v1/rooms/{sid}

Everyone in it leaves as server_evict and stays connected to be reachable; a call over the room ends with it. Ending a room that has already ended is not an error.

Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: write, 120 a minute

Parameters

NameInTypeDescription
sidpathstring

Response 204 — The room has ended.

Errors

StatusCode
401unauthenticated, token_expired, token_replayed, token_not_yet_valid
403permission_denied, app_suspended, quota_exhausted
404not_found, room_not_found, identity_not_found
429rate_limited
500internal
503signaling_unavailable, sfu_unavailable, recording_unavailable

List a room's participants, in the order they joined ​

GET /v1/rooms/{sid}/participants

Hidden participants are listed, with hidden true.

Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: read, 600 a minute

Parameters

NameInTypeDescription
sidpathstring
limit?queryinteger1–100. Default 20.
cursor?querystringThe nextCursor of the previous page. 1–512 characters.
state?querystringlive (the default): seats not yet left. all: every joining, with ended tracks. One of live, all.

Response 200 — A page of participants.

FieldTypeDescription
dataParticipant[]
nextCursorstring | nullThe cursor for the next page; null on the last.

Errors

StatusCode
400validation_failed, token_ttl_too_long
401unauthenticated, token_expired, token_replayed, token_not_yet_valid
403permission_denied, app_suspended, quota_exhausted
404not_found, room_not_found, identity_not_found
429rate_limited
500internal

Change a live participant's grants or metadata, or mute its tracks ​

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

The tenant's backend may do what a roomAdmin may, on anyone. grants replaces the participant's grants whole, narrowed by the application's grant ceiling as a minted token's are; hidden and room stay what they were when the seat was taken. At least one of grants, metadata or mutedTracks is required.

Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: write, 120 a minute

Parameters

NameInTypeDescription
sidpathstring
identitypathstringThe tenant's opaque identity string, URL-encoded. 1–200 characters.

Request body application/json

FieldTypeDescription
grants?GrantsWhat a participant may do. Every name is one the model has; any other is refused rather than ignored.
metadata?objectThe tenant's own JSON, at most 4 096 bytes as UTF-8. The platform never reads it.
mutedTracks?string[]Track sids to mute, in sfu rooms. A muted track stays muted until its publisher unmutes it. At most 16 items.

Response 200 — The participant, as it now stands.

FieldTypeDescription
sidstringMatches ^PT_[0-9a-f]{20}$.
identitystring
refstring | nullThe token's ref.
namestring | null
kindstringOne of standard, agent, egress, bridge.
statestringOne of joining, active, disconnected, left.
hiddenboolean
grantsGrantsWhat a participant may do. Every name is one the model has; any other is refused rather than ignored.
metadataobjectThe tenant's own JSON, at most 4 096 bytes as UTF-8. The platform never reads it.
joinedAtstring (date-time)
leftAtstring (date-time) | null
disconnectReasonstring | nullOne of client_leave, server_evict, timeout, transport_failure, duplicate_identity, quota.
tracksTrack[]

Errors

StatusCode
400validation_failed, token_ttl_too_long
401unauthenticated, token_expired, token_replayed, token_not_yet_valid
403permission_denied, app_suspended, quota_exhausted
404not_found, room_not_found, identity_not_found
409conflict, room_full, room_closed, duplicate_identity, already_answered
413payload_too_large
429rate_limited
500internal
503signaling_unavailable, sfu_unavailable, recording_unavailable

Evict a participant ​

DELETE /v1/rooms/{sid}/participants/{identity}

Out of the room now, and its socket closed on whichever node holds it.

Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: write, 120 a minute

Parameters

NameInTypeDescription
sidpathstring
identitypathstringThe tenant's opaque identity string, URL-encoded. 1–200 characters.

Response 204 — Evicted.

Errors

StatusCode
401unauthenticated, token_expired, token_replayed, token_not_yet_valid
403permission_denied, app_suspended, quota_exhausted
404not_found, room_not_found, identity_not_found
409conflict, room_full, room_closed, duplicate_identity, already_answered
429rate_limited
500internal
503signaling_unavailable, sfu_unavailable, recording_unavailable

Send a data message into a room from the server ​

POST /v1/rooms/{sid}/data

How a tenant's backend puts a system message into a call. It arrives with an empty from_identity. The platform never reads the payload.

Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: write, 120 a minute

Parameters

NameInTypeDescription
sidpathstring

Request body application/json

FieldTypeDescription
payloadstringAt most 15 360 bytes once decoded.
topic?stringAt most 100 characters.
to?string[]Identities. Absent or empty — everyone in the room. At most 200 items.
reliable?booleanDefault true.

Response 200 — Sent.

FieldTypeDescription
recipientsintegerHow many seats it was sent to.

Errors

StatusCode
400validation_failed, token_ttl_too_long
401unauthenticated, token_expired, token_replayed, token_not_yet_valid
403permission_denied, app_suspended, quota_exhausted
404not_found, room_not_found, identity_not_found
409conflict, room_full, room_closed, duplicate_identity, already_answered
413payload_too_large
429rate_limited
500internal
503signaling_unavailable, sfu_unavailable, recording_unavailable

Talkline documentation