> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # Create conference room POST https://%7BYour_Space_Name%7D.signalwire.com/api/fabric/resources/conference_rooms Content-Type: application/json Creates a Fabric Conference Room resource that can be reached through resource addresses and used in call routing. Use it for a programmable, addressable video room; use [Create video conference](/docs/apis/rest/video/video-conferences/create-video-conference) for a managed hosted conference, or [Create room](/docs/apis/rest/video/rooms/create-room) for an SDK-based Video Room configuration. #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_, _Messaging_, _Fax_, or _Video_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space). Reference: https://signalwire.com/docs/apis/rest/conference-rooms/create-conference-room ## Authentication - `Authorization` header (basic auth, required) — SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ``` ## Request ### Body (application/json) This endpoint expects a ConferenceRoomCreateRequest. - `name` (string, required) — The name of the Conference Room - `enable_room_previews` (boolean, required) — Enables live video room previews for the conference. - `display_name` (string, optional) — Display name of the Conference Room - `description` (string, optional) — The descrption of the Conference Room - `join_from` (datetime, optional) — The time users are allowed to start joining the conference. Joining before this time will result in failure to join the conference. - `join_until` (datetime, optional) — The time users are allowed to until the conference is locked. Attempting to join the conference after the set time will result in failure to join the conference. - `max_members` (integer, optional) — Maximum number of members allowed in the conference room - `quality` (enum, optional, default: 720p) — The video quality of the Conference Room. - Allowed values: `1080p`, `720p` - `remove_at` (datetime, optional) — The time to remove all participants from the conference. - `remove_after_seconds_elapsed` (integer, optional) — The amount of time in seconds to remove a particpant from a conference after they join. - `layout` (enum, optional) — The video layout of the conference. - Allowed values: `grid-responsive`, `grid-responsive-mobile`, `highlight-1-responsive`, `1x1`, `2x1`, `2x2`, `5up`, `3x3`, `4x4`, `5x5`, `6x6`, `8x8`, `10x10` - `record_on_start` (boolean, optional) — Starts recording when the conference starts. - `meta` (ConferenceRoomCreateRequestMeta, optional) — Metadata of the conference. - `sync_audio_video` (boolean, optional) — Syncs the participants audio and video. - `tone_on_entry_and_exit` (boolean, optional) — Plays a tone when a participant joins or leaves the conference. - `room_join_video_off` (boolean, optional) — Turns the conference video off when the participant joins the room if `true`. - `user_join_video_off` (boolean, optional) — Turns the participants video off when the participant joins the room if `true`. ## Response ### 200 The request has succeeded. - `id` (string, required) — Unique ID of the Conference Room. - `project_id` (string, required) — Unique ID of the Project. - `display_name` (string, required) — Display name of the Conference Room Fabric Resource - `type` (enum, required) — Type of the Fabric Resource - Allowed values: `video_room` - `created_at` (datetime, required) — Date and time when the resource was created. - `updated_at` (datetime, required) — Date and time when the resource was updated. - `conference_room` (ConferenceRoom, required) — Conference Room data. ## Errors ### 401 Unauthorized Error Access is unauthorized. - `error` (enum, required) - Allowed values: `Unauthorized` ### 404 Not Found Error The server cannot find the requested resource. - `error` (enum, required) - Allowed values: `Not Found` ### 422 Unprocessable Entity Error The request contains invalid parameters. See errors for details. - `errors` (list of Types.StatusCodes.RestApiErrorItem, required) — List of validation errors. ### 500 Internal Server Error An internal server error occurred. - `error` (enum, required) - Allowed values: `Internal Server Error` ## Types ### ConferenceRoomCreateRequestMeta Metadata of the conference. ### ConferenceRoom - `id` (string, required) — The unique id of the Conference Room - `name` (string, required) — The name of the Conference Room - `description` (string, required) — The descrption of the Conference Room - `display_name` (string, required) — Display name of the Conference Room - `max_members` (integer, required) — Maximum number of members allowed in the conference room - `quality` (enum, required, default: 720p) — The viudeo quality of the Conference Room. - Allowed values: `1080p`, `720p` - `fps` (enum, required) — The frames-per-second (fps) of the participants videos in the conference. - Allowed values: `30`, `20` - `join_from` (datetime, required, nullable) — The time users are allowed to start joining the conference. Joining before this time will result in failure to join the conference. - `join_until` (datetime, required, nullable) — The time users are allowed to until the conference is locked. Attempting to join the conference after the set time will result in failure to join the conference. - `remove_at` (datetime, required, nullable) — The time to remove all participants from the conference. - `remove_after_seconds_elapsed` (integer, required, nullable) — The amount of time in seconds to remove a particpant from a conference after they join. - `layout` (enum, required) — The video layout of the conference. - Allowed values: `grid-responsive`, `grid-responsive-mobile`, `highlight-1-responsive`, `1x1`, `2x1`, `2x2`, `5up`, `3x3`, `4x4`, `5x5`, `6x6`, `8x8`, `10x10` - `record_on_start` (boolean, required) — Starts recording when the conference starts. - `tone_on_entry_and_exit` (boolean, required) — Plays a tone when a participant joins or leaves the conference. - `room_join_video_off` (boolean, required) — Turns the conference video off when the participant joins the room if `true`. - `user_join_video_off` (boolean, required) — Turns the participants video off when the participant joins the room if `true`. - `enable_room_previews` (boolean, required) — Enables live video room previews for the conference. - `sync_audio_video` (boolean, required, nullable) — Syncs the participants audio and video. - `meta` (ConferenceRoomMeta, required) — Metadata of the conference. - `prioritize_handraise` (boolean, required) — Indicator if the Conference Room will prioritize showing participants utilizing the hand raised feature. ### Types.StatusCodes.RestApiErrorItem Details about a specific error. - `type` (string, required) — The category of error. - `code` (string, required) — A specific error code. - `message` (string, required) — A description of what caused the error. - `url` (string, required) — A link to documentation about this error. - `attribute` (string, optional, nullable) — The request parameter that caused the error, if applicable. ### ConferenceRoomMeta Metadata of the conference. ## Examples **Request** ```json { "name": "coffee_cafe", "enable_room_previews": true } ``` **Response** ```json { "id": "993ed018-9e79-4e50-b97b-984bd5534095", "project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780", "display_name": "Reception", "type": "video_room", "created_at": "2024-05-06T12:20:00Z", "updated_at": "2024-05-06T12:20:00Z", "conference_room": { "id": "1bd571e4-5ea4-4a70-a3c8-2bab5d20e754", "name": "coffee_cafe", "description": "This room is for coffee, no shop talk", "display_name": "Reception", "max_members": 30, "quality": "1080p", "fps": 30, "join_from": "2024-05-06T12:20:00Z", "join_until": "2024-05-06T12:20:00Z", "remove_at": "2024-05-06T12:20:00Z", "remove_after_seconds_elapsed": 1, "layout": "grid-responsive", "record_on_start": true, "tone_on_entry_and_exit": true, "room_join_video_off": true, "user_join_video_off": true, "enable_room_previews": true, "sync_audio_video": true, "meta": { "foo": "bar" }, "prioritize_handraise": false } } ``` **SDK Code** ```python import requests url = "https://{your_space_name}.signalwire.com/api/fabric/resources/conference_rooms" payload = { "name": "coffee_cafe", "enable_room_previews": True } headers = { "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers, auth=("", "")) print(response.json()) ``` ```javascript const url = 'https://{your_space_name}.signalwire.com/api/fabric/resources/conference_rooms'; const credentials = btoa(":"); const options = { method: 'POST', headers: { Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json' }, body: '{"name":"coffee_cafe","enable_room_previews":true}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://{your_space_name}.signalwire.com/api/fabric/resources/conference_rooms" payload := strings.NewReader("{\n \"name\": \"coffee_cafe\",\n \"enable_room_previews\": true\n}") req, _ := http.NewRequest("POST", url, payload) req.SetBasicAuth("", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://{your_space_name}.signalwire.com/api/fabric/resources/conference_rooms") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request.basic_auth("", "") request["Content-Type"] = 'application/json' request.body = "{\n \"name\": \"coffee_cafe\",\n \"enable_room_previews\": true\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://{your_space_name}.signalwire.com/api/fabric/resources/conference_rooms") .basicAuth("", "") .header("Content-Type", "application/json") .body("{\n \"name\": \"coffee_cafe\",\n \"enable_room_previews\": true\n}") .asString(); ``` ```php request('POST', 'https://{your_space_name}.signalwire.com/api/fabric/resources/conference_rooms', [ 'body' => '{ "name": "coffee_cafe", "enable_room_previews": true }', 'headers' => [ 'Content-Type' => 'application/json', ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://{your_space_name}.signalwire.com/api/fabric/resources/conference_rooms"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"name\": \"coffee_cafe\",\n \"enable_room_previews\": true\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = [ "Authorization": "Basic \(credentials)", "Content-Type": "application/json" ] let parameters = [ "name": "coffee_cafe", "enable_room_previews": true ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/fabric/resources/conference_rooms")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```