NAME

Twilio::Rest::Video::V1::Room - The Room resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $room = $client->video->v1->rooms->create(\%options);
for my $room ($client->video->v1->rooms->read({}, 20)) {
  ...
}
my $room = $client->video->v1->rooms($sid)->fetch;
$client->video->v1->rooms($sid)->update($status);

DESCRIPTION

Video rooms with one or more participants

This file holds RoomList, RoomPage, RoomContext and RoomInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

RoomList

Returned by $client->video->v1->rooms. See also Twilio::ListResource.

create

my $room = $client->video->v1->rooms->create(\%options);

Returns a RoomInstance.

The options are:

audio_only

When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed.

empty_room_timeout

Configures how long (in minutes) a room will remain active after last participant leaves. Valid values range from 1 to 60 minutes (no fractions).

enable_turn

Deprecated, now always considered to be true.

large_room

When set to true, indicated that this is the large room.

max_participant_duration

The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours).

max_participants

The maximum number of concurrent Participants allowed in the room. The maximum allowed value is 50.

media_region

The region for the Room's media server. Can be one of the available Media Regions.

record_participants_on_connect

Whether to start recording when Participants connect.

recording_rules

A collection of Recording Rules that describe how to include or exclude matching tracks for recording A hash or array reference, or a string of JSON.

status_callback

The URL Twilio should call using the status_callback_method to send status information to your application on every room event. See Status Callbacks for more info.

status_callback_method

The HTTP method Twilio should use to call status_callback. Can be POST or GET. One of GET or POST.

transcribe_participants_on_connect

Whether to start transcriptions when Participants connect. If TranscriptionsConfiguration is not provided, default settings will be used.

transcriptions_configuration

A collection of properties that describe transcription behaviour. If TranscribeParticipantsOnConnect is set to true and TranscriptionsConfiguration is not provided, default settings will be used. A hash or array reference, or a string of JSON.

type

One of group, go, peer-to-peer or group-small.

unique_name

An application-defined string that uniquely identifies the resource. It can be used as a room_sid in place of the resource's sid in the URL to address the resource, assuming it does not contain any reserved characters that would need to be URL encoded. This value is unique for in-progress rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is in-progress.

unused_room_timeout

Configures how long (in minutes) a room will remain active if no one joins. Valid values range from 1 to 60 minutes (no fractions).

video_codecs

An array of the video codecs that are supported when publishing a track in the room. Can be: VP8 and H264. One of VP8 or H264. An array reference.

read

my @records = $client->video->v1->rooms->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

The options are:

date_created_after

Read only rooms that started on or after this date, given as YYYY-MM-DD. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

date_created_before

Read only rooms that started before this date, given as YYYY-MM-DD. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

status

Read only the rooms with this status. Can be: in-progress (default) or completed One of in-progress, completed or failed.

unique_name

Read only rooms with the this unique_name.

stream

my $stream = $client->video->v1->rooms->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->video->v1->rooms->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->video->v1->rooms->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->video->v1->rooms->get_context($sid);

Returns a RoomContext, and makes no request.

RoomPage

A Twilio::Page of RoomInstance objects.

records_key

build_instance

Used by Twilio::Page.

RoomContext

Returned by $client->video->v1->rooms($sid). It makes no request until one of these methods is called.

fetch

my $room = $client->video->v1->rooms($sid)->fetch;

Returns a RoomInstance.

update

my $room = $client->video->v1->rooms($sid)->update($status);

Returns a RoomInstance.

The required values are:

$status

One of in-progress, completed or failed.

participants

my $list = $object->participants;

my $context = $object->participants($sid);

See Twilio::Rest::Video::V1::Room::Participant.

recording_rules

my $list = $object->recording_rules;

See Twilio::Rest::Video::V1::Room::RecordingRules.

recordings

my $list = $object->recordings;

my $context = $object->recordings($sid);

See Twilio::Rest::Video::V1::Room::RoomRecording.

transcriptions

my $list = $object->transcriptions;

my $context = $object->transcriptions($ttid);

See Twilio::Rest::Video::V1::Room::Transcriptions.

RoomInstance

See also Twilio::InstanceResource.

It has fetch, update, participants, recording_rules, recordings and transcriptions, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the Room resource.

audio_only

When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed.

date_created

The date and time in GMT when the resource was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date and time in GMT when the resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

duration

The duration of the room in seconds.

empty_room_timeout

Specifies how long (in minutes) a room will remain active after last participant leaves. Can be configured when creating a room via REST API. For Ad-Hoc rooms this value cannot be changed.

enable_turn

Deprecated, now always considered to be true.

end_time

The UTC end time of the room in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

large_room

Indicates if this is a large room.

The URLs of related resources.

max_concurrent_published_tracks

The maximum number of published audio, video, and data tracks all participants combined are allowed to publish in the room at the same time. Check Programmable Video Limits for more details. If it is set to 0 it means unconstrained.

max_participant_duration

The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours).

max_participants

The maximum number of concurrent Participants allowed in the room.

media_region

The region for the Room's media server. Can be one of the available Media Regions.

record_participants_on_connect

Whether to start recording when Participants connect.

sid

The unique string that Twilio created to identify the Room resource.

status

One of in-progress, completed or failed.

status_callback

The URL Twilio calls using the status_callback_method to send status information to your application on every room event. See Status Callbacks for more info.

status_callback_method

The HTTP method Twilio uses to call status_callback. Can be POST or GET and defaults to POST. One of GET or POST.

type

One of group, go, peer-to-peer or group-small.

unique_name

An application-defined string that uniquely identifies the resource. It can be used as a room_sid in place of the resource's sid in the URL to address the resource, assuming it does not contain any reserved characters that would need to be URL encoded. This value is unique for in-progress rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is in-progress.

unused_room_timeout

Specifies how long (in minutes) a room will remain active if no one joins. Can be configured when creating a room via REST API. For Ad-Hoc rooms this value cannot be changed.

url

The absolute URL of the resource.

video_codecs

An array of the video codecs that are supported when publishing a track in the room. Can be: VP8 and H264.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.