Create room

POST /v1/Rooms

Video rooms with one or more participants

application/x-www-form-urlencoded

Body

  • EnableTurn boolean

    Deprecated, now always considered to be true.

  • Type string

    Values are go, peer-to-peer, group, or group-small.

  • UniqueName string

    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.

  • StatusCallback string(uri)

    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.

  • StatusCallbackMethod string(http-method)

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

    Values are GET or POST.

  • MaxParticipants integer

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

  • RecordParticipantsOnConnect boolean

    Whether to start recording when Participants connect.

  • TranscribeParticipantsOnConnect boolean

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

  • VideoCodecs array[string]

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

    Values are VP8 or H264.

  • MediaRegion string

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

  • RecordingRules

    A collection of Recording Rules that describe how to include or exclude matching tracks for recording

  • TranscriptionsConfiguration object

    A collection of properties that describe transcription behaviour. If TranscribeParticipantsOnConnect is set to true and TranscriptionsConfiguration is not provided, default settings will be used.

  • AudioOnly boolean

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

  • MaxParticipantDuration integer

    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).

  • EmptyRoomTimeout integer

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

  • UnusedRoomTimeout integer

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

  • LargeRoom boolean

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

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • sid string | null

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

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^RM[0-9a-fA-F]{32}$.

    • status string

      Values are in-progress, completed, or failed.

    • date_created string(date-time) | null

      The date and time in GMT when the resource was created specified in ISO 8601 format.

    • date_updated string(date-time) | null

      The date and time in GMT when the resource was last updated specified in ISO 8601 format.

    • account_sid string | null

      The SID of the Account that created the Room resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • enable_turn boolean | null

      Deprecated, now always considered to be true.

    • unique_name string | null

      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.

    • status_callback string(uri) | null

      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 string(http-method) | null

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

      Values are GET or POST.

    • end_time string(date-time) | null

      The UTC end time of the room in ISO 8601 format.

    • duration integer | null

      The duration of the room in seconds.

    • type string

      Values are go, peer-to-peer, group, or group-small.

    • max_participants integer

      The maximum number of concurrent Participants allowed in the room.

      Default value is 0.

    • max_participant_duration integer

      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).

      Default value is 0.

    • max_concurrent_published_tracks integer | null

      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.

    • record_participants_on_connect boolean | null

      Whether to start recording when Participants connect.

    • video_codecs array[string] | null

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

      Values are VP8 or H264.

    • media_region string | null

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

    • audio_only boolean | null

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

    • empty_room_timeout integer

      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.

      Default value is 0.

    • unused_room_timeout integer

      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.

      Default value is 0.

    • large_room boolean | null

      Indicates if this is a large room.

    • url string(uri) | null

      The absolute URL of the resource.

POST /v1/Rooms
curl \
 --request POST 'https://video.twilio.com/v1/Rooms' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'value=%7B%7D'
{"value"=>{}}
{"Type"=>"go", "UniqueName"=>"room1"}
{"Type"=>"group", "UniqueName"=>"grouproom", "RecordingRules"=>"%5B%7B%22type%22%3A%22exclude%22%2C%22all%22%3A%20true%7D%5D"}
{"Type"=>"group", "AudioOnly"=>true, "UniqueName"=>"grouproom", "RecordingRules"=>"%5B%7B%22type%22%3A%22exclude%22%2C%22all%22%3A%20true%7D%5D"}
{"Type"=>"group-small", "UniqueName"=>"SmallDailyStandup"}
{"Type"=>"group", "UniqueName"=>"MyWebinar", "MaxParticipants"=>90}
{"Type"=>"group", "AudioOnly"=>true, "UniqueName"=>"MyWebinar", "MaxParticipants"=>90}
{
  "sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "type": "peer-to-peer",
  "links": {
    "recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
    "participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
    "transcriptions": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions",
    "recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
  },
  "status": "in-progress",
  "duration": 0,
  "end_time": "2015-07-30T20:00:00Z",
  "audio_only": false,
  "large_room": false,
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "enable_turn": true,
  "unique_name": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "media_region": "us1",
  "video_codecs": [
    "VP8"
  ],
  "status_callback": null,
  "max_participants": 10,
  "empty_room_timeout": 5,
  "unused_room_timeout": 5,
  "status_callback_method": "POST",
  "max_participant_duration": 86400,
  "record_participants_on_connect": false,
  "max_concurrent_published_tracks": 0
}
{
  "sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "type": "go",
  "links": {
    "recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
    "participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
    "transcriptions": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions",
    "recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
  },
  "status": "in-progress",
  "duration": 0,
  "end_time": "2015-07-30T20:00:00Z",
  "audio_only": false,
  "large_room": false,
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "enable_turn": true,
  "unique_name": "room1",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "media_region": "us1",
  "video_codecs": [
    "VP8"
  ],
  "status_callback": null,
  "max_participants": 10,
  "empty_room_timeout": 5,
  "unused_room_timeout": 5,
  "status_callback_method": "POST",
  "max_participant_duration": 86400,
  "record_participants_on_connect": false,
  "max_concurrent_published_tracks": 0
}
{
  "sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "type": "group",
  "links": {
    "recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
    "participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
    "transcriptions": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions",
    "recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
  },
  "status": "in-progress",
  "duration": 0,
  "end_time": "2015-07-30T20:00:00Z",
  "audio_only": false,
  "large_room": false,
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "enable_turn": true,
  "unique_name": "grouproom",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "media_region": "us1",
  "video_codecs": [
    "VP8"
  ],
  "status_callback": null,
  "max_participants": 50,
  "empty_room_timeout": 5,
  "unused_room_timeout": 5,
  "status_callback_method": "POST",
  "max_participant_duration": 86400,
  "record_participants_on_connect": false,
  "max_concurrent_published_tracks": 170
}
{
  "sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "type": "group",
  "links": {
    "recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
    "participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
    "transcriptions": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions",
    "recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
  },
  "status": "in-progress",
  "duration": 0,
  "end_time": "2015-07-30T20:00:00Z",
  "audio_only": true,
  "large_room": false,
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "enable_turn": true,
  "unique_name": "grouproom",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "media_region": "us1",
  "video_codecs": [],
  "status_callback": null,
  "max_participants": 50,
  "empty_room_timeout": 5,
  "unused_room_timeout": 5,
  "status_callback_method": "POST",
  "max_participant_duration": 86400,
  "record_participants_on_connect": false,
  "max_concurrent_published_tracks": 170
}
{
  "sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "type": "group-small",
  "links": {
    "recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
    "participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
    "transcriptions": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions",
    "recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
  },
  "status": "in-progress",
  "duration": 0,
  "end_time": "2015-07-30T20:00:00Z",
  "audio_only": false,
  "large_room": false,
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "enable_turn": true,
  "unique_name": "SmallDailyStandup",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "media_region": "us1",
  "video_codecs": [
    "VP8"
  ],
  "status_callback": null,
  "max_participants": 4,
  "empty_room_timeout": 5,
  "unused_room_timeout": 5,
  "status_callback_method": "POST",
  "max_participant_duration": 86400,
  "record_participants_on_connect": false,
  "max_concurrent_published_tracks": 170
}
{
  "sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "type": "group",
  "links": {
    "recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
    "participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
    "transcriptions": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions",
    "recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
  },
  "status": "in-progress",
  "duration": 0,
  "end_time": "2015-07-30T20:00:00Z",
  "audio_only": false,
  "large_room": false,
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "enable_turn": true,
  "unique_name": "MyWebinar",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "media_region": "us1",
  "video_codecs": [
    "VP8"
  ],
  "status_callback": null,
  "max_participants": 50,
  "empty_room_timeout": 5,
  "unused_room_timeout": 5,
  "status_callback_method": "POST",
  "max_participant_duration": 86400,
  "record_participants_on_connect": false,
  "max_concurrent_published_tracks": 16
}
{
  "sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "type": "group",
  "links": {
    "recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
    "participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
    "transcriptions": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions",
    "recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
  },
  "status": "in-progress",
  "duration": 0,
  "end_time": "2015-07-30T20:00:00Z",
  "audio_only": true,
  "large_room": false,
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "enable_turn": true,
  "unique_name": "MyWebinar",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "media_region": "us1",
  "video_codecs": [],
  "status_callback": null,
  "max_participants": 50,
  "empty_room_timeout": 5,
  "unused_room_timeout": 5,
  "status_callback_method": "POST",
  "max_participant_duration": 86400,
  "record_participants_on_connect": false,
  "max_concurrent_published_tracks": 16
}