> This page is for APIs.

> 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 video conference

POST https://%7BYour_Space_Name%7D.signalwire.com/api/video/conferences
Content-Type: application/json

Creates a managed Video Conference in the project with hosted guest and moderator access. Use it when SignalWire should provide the conference experience as well as the video session. For a custom client built with Room Tokens and a SignalWire client SDK, use [Create room](/docs/apis/rest/video/rooms/create-room).

#### Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Video_.

[Learn more about API scopes](/docs/platform/your-signalwire-api-space).

Reference: https://signalwire.com/docs/apis/rest/video/video-conferences/create-video-conference

## 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 Video.CreateConferenceRequest.

- `display_name` (string, required) — Display name of the video conference. Maximum of 200 characters.
- `name` (string, optional) — A named unique identifier for the conference. Allowed characters: `A-Za-z0-9_-`. Maximum of 100 characters.
- `description` (string, optional) — Description of the conference. Maximum of 3000 characters.
- `join_from` (datetime, optional) — Conference 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_until` (datetime, optional) — Conference 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`.
- `quality` (enum, optional, default: 720p) — The conference's resolution.
  - Allowed values: `720p`, `1080p`
- `layout` (enum, optional, default: grid-responsive) — The conference's initial layout.
  - Allowed values: `grid-responsive`, `grid-responsive-mobile`, `highlight-1-responsive`, `1x1`, `2x1`, `2x2`, `5up`, `3x3`, `4x4`, `5x5`, `6x6`, `8x8`, `10x10`
- `size` (enum, optional, default: medium) — The size of the video conference.
  - Allowed values: `small`, `medium`, `large`
- `record_on_start` (boolean, optional) — Whether to start recording when a conference session begins.
- `enable_room_previews` (boolean, optional) — Whether a preview video of the conference content is generated.
- `enable_chat` (boolean, optional, default: true) — Whether group chat is enabled for conference participants.
- `dark_primary` (string, optional, default: #044EF4) — CTA buttons and selected items color (dark theme).
- `dark_background` (string, optional, default: #FFFFFF) — Main background color (dark theme).
- `dark_foreground` (string, optional, default: #1D2127) — Main foreground color (dark theme).
- `dark_success` (string, optional, default: #17BB58) — Success indication color (dark theme).
- `dark_negative` (string, optional, default: #F42C50) — Error indication color (dark theme).
- `light_primary` (string, optional, default: #044EF4) — CTA buttons and selected items color (light theme).
- `light_background` (string, optional, default: #FFFFFF) — Main background color (light theme).
- `light_foreground` (string, optional, default: #1D2127) — Main foreground color (light theme).
- `light_success` (string, optional, default: #17BB58) — Success indication color (light theme).
- `light_negative` (string, optional, default: #F42C50) — Error indication color (light theme).

## Response

### 200

Conference response wrapper.

- `id` (string, required) — Unique ID of the video conference.
- `name` (string, required) — A named unique identifier for the conference. Allowed characters: `A-Za-z0-9_-`.
- `display_name` (string, required, nullable) — Display name of the video conference. Maximum of 200 characters.
- `description` (string, required, nullable) — Description of the conference. Maximum of 3000 characters.
- `join_from` (datetime, required, nullable) — Conference does not accept new participants before this time.
- `join_until` (datetime, required, nullable) — Conference stops accepting new participants at this time, but keeps running until all participants leave.
- `quality` (enum, required) — The conference's resolution.
  - Allowed values: `720p`, `1080p`
- `layout` (enum, required) — The conference's initial layout.
  - Allowed values: `grid-responsive`, `grid-responsive-mobile`, `highlight-1-responsive`, `1x1`, `2x1`, `2x2`, `5up`, `3x3`, `4x4`, `5x5`, `6x6`, `8x8`, `10x10`
- `size` (enum, required, nullable) — The size of the video conference.
  - Allowed values: `small`, `medium`, `large`
- `record_on_start` (boolean, required) — Whether to start recording when a conference session begins.
- `tone_on_entry_and_exit` (boolean, required) — Whether a tone is played when a member enters or exits the conference.
- `user_join_video_off` (boolean, required) — Whether participants join with video off by user setting.
- `room_join_video_off` (boolean, required) — Whether participants join with video off by room setting.
- `enable_chat` (boolean, required) — Whether group chat is enabled for conference participants.
- `enable_room_previews` (boolean, required, nullable) — Whether a preview video of the conference content is generated.
- `dark_primary` (string, required, nullable) — CTA buttons and selected items color (dark theme).
- `dark_background` (string, required, nullable) — Main background color (dark theme).
- `dark_foreground` (string, required, nullable) — Main foreground color (dark theme).
- `dark_success` (string, required, nullable) — Success indication color (dark theme).
- `dark_negative` (string, required, nullable) — Error indication color (dark theme).
- `light_primary` (string, required, nullable) — CTA buttons and selected items color (light theme).
- `light_background` (string, required, nullable) — Main background color (light theme).
- `light_foreground` (string, required, nullable) — Main foreground color (light theme).
- `light_success` (string, required, nullable) — Success indication color (light theme).
- `light_negative` (string, required, nullable) — Error indication color (light theme).
- `meta` (VideoConferenceMeta, required, nullable) — User-defined metadata for the conference.
- `created_at` (datetime, required) — Timestamp when the conference was created.
- `updated_at` (datetime, required) — Timestamp when the conference was last updated.
- `active_session` (Video.ActiveSession, optional) — Active session information. Only present when requested via the `include_active_session` query parameter.

## Errors

### 400 Bad Request Error

The request is invalid.

- `error` (enum, required)
  - Allowed values: `Bad Request`

### 401 Unauthorized Error

Access is unauthorized.

- `error` (enum, required)
  - Allowed values: `Unauthorized`

### 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

### VideoConferenceMeta

User-defined metadata for the conference.

### Video.ActiveSession

Active session information for a room.

- `id` (string, optional) — Unique ID of the session.
- `room_id` (string, optional) — Unique ID of the Room if the Session was created from a Room and was not an auto-created Session.
- `name` (string, optional) — The named identifier of room session.
- `display_name` (string, optional) — Display name of room, no character limitations. Maximum of 200 characters. Defaults to the value of name.
- `join_from` (datetime, optional) — Room Session does not accept new Members before this time.
- `join_until` (datetime, optional) — Room Session stops accepting new Members at this time.
- `remove_at` (datetime, optional) — Remove Members from the Room Session at this time.
- `remove_after_seconds_elapsed` (integer, optional) — Remove Members after they are in the Room Session for N seconds.
- `layout` (string, optional) — The Room Session's initial layout. See documentation for a full list of supported layouts.
- `max_members` (integer, optional) — The maximum number of members allowed in the room at a time.
- `fps` (enum, optional) — The Room Session's frames per second.
  - Allowed values: `20`, `30`
- `quality` (enum, optional) — The Room Session's resolution.
  - Allowed values: `720p`, `1080p`
- `start_time` (datetime, optional) — Start time of the session.
- `end_time` (datetime, optional) — End time of the session.
- `duration` (integer, optional) — How long, in seconds, the Room Session lasted.
- `status` (enum, optional) — Status of the session.
  - Allowed values: `in-progress`, `completed`
- `record_on_start` (boolean, optional) — Whether a recording was automatically started when this Room Session began.
- `enable_room_previews` (boolean, optional) — Whether a video with a preview of the content of the room is to be generated.
- `preview_url` (string, optional) — If room previews are enabled and the room session is in progress, this is the URL of the preview video.
- `audio_video_sync` (boolean, optional) — Enable/disable jitter buffer audio-video sync.

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

## Examples

**Request**

```json
{
  "display_name": "My Conference's Name"
}
```

**Response**

```json
{
  "id": "c22d24f6-5a47-4597-9a23-c7d01e696b92",
  "name": "my_conference",
  "display_name": "My Conference's Name",
  "description": "This conference will be used for full company all hands meetings",
  "join_from": "2022-01-01T00:00:00Z",
  "join_until": "2022-12-31T23:59:59Z",
  "quality": "720p",
  "layout": "grid-responsive",
  "size": "medium",
  "record_on_start": false,
  "tone_on_entry_and_exit": true,
  "user_join_video_off": false,
  "room_join_video_off": false,
  "enable_chat": true,
  "enable_room_previews": false,
  "dark_primary": "#044EF4",
  "dark_background": "#FFFFFF",
  "dark_foreground": "#1D2127",
  "dark_success": "#17BB58",
  "dark_negative": "#F42C50",
  "light_primary": "#044EF4",
  "light_background": "#FFFFFF",
  "light_foreground": "#1D2127",
  "light_success": "#17BB58",
  "light_negative": "#F42C50",
  "meta": {},
  "created_at": "2022-01-01T10:00:00Z",
  "updated_at": "2022-01-01T11:00:00Z",
  "active_session": {
    "id": "c22d24f6-5a47-4597-9a23-c7d01e696b92",
    "room_id": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
    "name": "my_example_room",
    "display_name": "My Room's Name",
    "join_from": "2022-01-01T00:00:00Z",
    "join_until": "2022-12-31T23:59:59Z",
    "remove_at": "2022-12-31T23:59:59Z",
    "remove_after_seconds_elapsed": 120,
    "layout": "grid-responsive",
    "max_members": 20,
    "fps": 20,
    "quality": "720p",
    "start_time": "2022-01-01T10:00:00Z",
    "end_time": "2022-01-01T11:00:00Z",
    "duration": 120,
    "status": "completed",
    "record_on_start": true,
    "enable_room_previews": true,
    "preview_url": "https://example.signalwire.com/api/video/room_sessions/c22d24f6-5a47-4597-9a23-c7d01e696b92/preview",
    "audio_video_sync": true
  }
}
```

**SDK Code**

```python
import requests

url = "https://{your_space_name}.signalwire.com/api/video/conferences"

payload = { "display_name": "My Conference's Name" }
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<project_id>", "<api_token>"))

print(response.json())
```

```javascript
const url = 'https://{your_space_name}.signalwire.com/api/video/conferences';
const credentials = btoa("<project_id>:<api_token>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"display_name":"My Conference\'s Name"}'
};

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/video/conferences"

	payload := strings.NewReader("{\n  \"display_name\": \"My Conference's Name\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.SetBasicAuth("<project_id>", "<api_token>")
	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/video/conferences")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request.basic_auth("<project_id>", "<api_token>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"display_name\": \"My Conference's Name\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://{your_space_name}.signalwire.com/api/video/conferences")
  .basicAuth("<project_id>", "<api_token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"display_name\": \"My Conference's Name\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://{your_space_name}.signalwire.com/api/video/conferences', [
  'body' => '{
  "display_name": "My Conference\'s Name"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<project_id>', '<api_token>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://{your_space_name}.signalwire.com/api/video/conferences");
client.Authenticator = new HttpBasicAuthenticator("<project_id>", "<api_token>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"display_name\": \"My Conference's Name\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<project_id>:<api_token>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = ["display_name": "My Conference's Name"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/video/conferences")! 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()
```