create

View as MarkdownOpen in Claude

Create a new video room.

Request

namestringRequiredformat: "^[A-Za-z0-9_\-]+$"<=100 characters
A named unique identifier for the room. Allowed characters: `A-Za-z0-9_-`. Maximum of 100 characters.
display_namestringOptional<=200 characters
Display name of the room. Maximum of 200 characters. Defaults to the value of name.
descriptionstringOptional<=3000 characters
Description of the room. Maximum of 3000 characters.
max_membersintegerOptional1-300Defaults to 20
The maximum number of members in the room at a time. Must be at least 1 to a maximum of 300.
qualityenumOptional
The room's resolution.
Allowed values:
join_fromdatetimeOptional
Room does not accept new participants before this time. Expects RFC 3339 datetime: `2022-01-01T23:59:60Z`. Date only: `2022-01-01` will be converted to `2022-01-01T00:00:00Z`.
join_untildatetimeOptional
Room stops accepting new participants at this time, but keeps running until all participants leave. Expects RFC 3339 datetime: `2022-01-01T23:59:60Z`. Date only: `2022-01-01` will be converted to `2022-01-01T00:00:00Z`.
remove_atdatetimeOptional
Remove users from the room at this time. Expects RFC 3339 datetime: `2022-01-01T23:59:60Z`. Date only: `2022-01-01` will be converted to `2022-01-01T00:00:00Z`.
remove_after_seconds_elapsedintegerOptional1-200000
Remove users after they are in the room for N seconds.
layoutenumOptional
The room's initial layout.
record_on_startbooleanOptionalDefaults to false
Specifies whether to start recording a Room Session when one is started for this Room.
enable_room_previewsbooleanOptionalDefaults to false
Whether a video with a preview of the content of the room is to be generated.
metaobjectOptional
User-defined metadata for the room. Must be a valid JSON object. Maximum of 2000 characters when serialized.
sync_audio_videobooleanOptional
Enable/disable jitter buffer audio-video sync.

Response

idstringRequiredformat: "uuid"
A unique identifier for the room.
namestringRequired
A named unique identifier for the room.
display_namestring or nullRequired
Display name of the room.
descriptionstring or nullRequired
Description of the room.
max_membersintegerRequired
The maximum number of members in the room at a time.
qualityenumRequired
The room's resolution.
Allowed values:
fpsintegerRequired
Frames per second parameter of room video quality.
join_fromdatetime or nullRequired
Room does not accept new participants before this time.
join_untildatetime or nullRequired
Room stops accepting new participants at this time.
remove_atdatetime or nullRequired
Remove users from the room at this time.
remove_after_seconds_elapsedinteger or nullRequired
Remove users after they are in the room for N seconds.
layoutenumRequired
The room's initial layout.
record_on_startbooleanRequired
Specifies whether to start recording a Room Session when one is started for this Room.
tone_on_entry_and_exitbooleanRequired
Whether a tone is played when participants enter or exit the room.
room_join_video_offbooleanRequired
Whether the room's video is turned off when participants join.
user_join_video_offbooleanRequired
Whether a user's video is turned off when they join the room.
enable_room_previewsboolean or nullRequired
Whether a video with a preview of the content of the room is to be generated.
sync_audio_videoboolean or nullRequired
Enable/disable jitter buffer audio-video sync.
metaobject or nullRequired
User-defined metadata for the room.
prioritize_handraisebooleanRequired
Whether hand raises are prioritized in the room layout.
created_atdatetimeRequired
Timestamp when the room was created.
updated_atdatetimeRequired
Timestamp when the room was last updated.
active_sessionobjectOptional
Active session information for the room.

Response Example

Response
1{
2 "id": "c22d24f6-5a47-4597-9a23-c7d01e696b92",
3 "name": "my_room",
4 "display_name": "My Room's Name",
5 "description": "This room will be used for full company all hands meetings",
6 "max_members": 20,
7 "quality": "720p",
8 "fps": 20,
9 "join_from": "2022-01-01T00:00:00Z",
10 "join_until": "2022-12-31T23:59:59Z",
11 "remove_at": "2022-12-31T23:59:59Z",
12 "remove_after_seconds_elapsed": 120,
13 "layout": "grid-responsive",
14 "record_on_start": false,
15 "tone_on_entry_and_exit": true,
16 "room_join_video_off": false,
17 "user_join_video_off": false,
18 "enable_room_previews": false,
19 "sync_audio_video": true,
20 "meta": {},
21 "prioritize_handraise": false,
22 "created_at": "2022-01-01T10:00:00Z",
23 "updated_at": "2022-01-01T11:00:00Z",
24 "active_session": {
25 "id": "c22d24f6-5a47-4597-9a23-c7d01e696b92",
26 "room_id": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
27 "name": "my_example_room",
28 "display_name": "My Room's Name",
29 "join_from": "2022-01-01T00:00:00Z",
30 "join_until": "2022-12-31T23:59:59Z",
31 "remove_at": "2022-12-31T23:59:59Z",
32 "remove_after_seconds_elapsed": 120,
33 "layout": "grid-responsive",
34 "max_members": 20,
35 "fps": 20,
36 "quality": "720p",
37 "start_time": "2022-01-01T10:00:00Z",
38 "end_time": "2022-01-01T11:00:00Z",
39 "duration": 120,
40 "status": "completed",
41 "record_on_start": true,
42 "enable_room_previews": true,
43 "preview_url": "https://example.signalwire.com/api/video/room_sessions/c22d24f6-5a47-4597-9a23-c7d01e696b92/preview",
44 "audio_video_sync": true
45 }
46}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com",
7});
8
9const result = await client.video.rooms.create({
10 name: "my_room",
11 display_name: "My Room",
12 max_members: 10,
13 quality: "720p",
14});
15console.log("Created:", result.id);