Skip to main content
PATCH
/
rooms
/
{room_id}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const room = await client.rooms.update('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0');

console.log(room.data);
{
  "data": {
    "id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
    "max_participants": 50,
    "unique_name": "My Room",
    "created_at": "2021-04-16T09:46:20.954863Z",
    "updated_at": "2021-04-16T10:24:55.962200Z",
    "active_session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
    "enable_recording": true,
    "webhook_event_failover_url": "https://failover.example.com",
    "webhook_timeout_secs": 25,
    "webhook_event_url": "https://www.example.com",
    "sessions": [
      {
        "id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
        "room_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
        "active": true,
        "created_at": "2021-04-16T09:46:20.954863Z",
        "updated_at": "2021-04-16T10:24:55.962200Z",
        "participants": [],
        "record_type": "room_session"
      }
    ],
    "record_type": "room"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

room_id
string<uuid>
required

The unique identifier of a room.

Example:

"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"

Body

application/json

Parameters that can be defined during room update.

unique_name
string

The unique (within the Telnyx account scope) name of the room.

Example:

"My room"

max_participants
integer
default:10

The maximum amount of participants allowed in a room. If new participants try to join after that limit is reached, their request will be rejected.

Required range: 2 <= x <= 50
Example:

10

enable_recording
boolean
default:false

Enable or disable recording for that room.

Example:

true

webhook_event_url
string<uri>

The URL where webhooks related to this room will be sent. Must include a scheme, such as 'https'.

Example:

"https://example.com"

webhook_event_failover_url
string<uri> | null
default:""

The failover URL where webhooks related to this room will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.

Example:

"https://failover.example.com"

webhook_timeout_secs
integer | null

Specifies how many seconds to wait before timing out a webhook.

Required range: 0 <= x <= 30
Example:

25

Response

Update room response.

data
object
Example:
{
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"max_participants": 50,
"unique_name": "My Room",
"created_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"active_session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
"enable_recording": true,
"webhook_event_failover_url": "https://failover.example.com",
"webhook_timeout_secs": 25,
"webhook_event_url": "https://www.example.com",
"sessions": [
{
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
"room_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"active": true,
"created_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"participants": [],
"record_type": "room_session"
}
],
"record_type": "room"
}