Generating Room URLs

Rooms are where video calls (sessions) take place. Create or delete Whereby rooms programmatically using a simple API request. Rooms can be created on demand, or ahead of time for scheduled meetings.

To use the API, you’ll need to create an API key. A new key is generated from the “Configure” section in the Embedded dashboard. Your API key is secret and should only be used from your server.

Creating rooms

Once you have secured your API key, you can create a room by sending an HTTP request with the necessary properties in the body. Available properties and formats can be found in the API reference. Some features like the URL pattern of the room name and room size (roomMode) can only be set during the meetings creation.

endDate is interpreted as UTC by default, but other time zones are supported by including an offset in hours and minutes. For example, Eastern Standard Time (EST) would be expressed as 2099-08-11T07:56:01-05:00.

Rooms are fully functional from the time they are created. They can then be used alongside our SDK to embed on your platform

curl https://api.whereby.dev/v1/meetings \
  --header "Authorization: Bearer $YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --request POST \
  --data @- << EOF
{
  "endDate": "2099-02-18T14:23:00.000Z",
  "fields": ["hostRoomUrl"]
}
EOF
{
    "meetingId": "1",
    "startDate": "2022-02-17T14:24:00.000Z",
    "endDate": "2099-02-18T14:23:00.000Z",
    "roomUrl": "https://example.whereby.com/room",
    "hostRoomUrl": "https://example.whereby.com/room?roomKey=eFhcG...i00ZG"
} 

endDate and deleting rooms

Creating rooms via the API, produces a room with a unique URL and a limited lifespan. The endDate property is used to indicate the time at which the room will be marked for deactivation. It does not indicate when a meeting will end and remove participants.

One hour after the endDate the room will be deactivated and things like Webhook events, host privileges, new cloud recordings, and participant minutes consumption will no longer function. The room will then automatically be deleted within 24 hours of the endDate provided.

If you'd like to limit the length of a meeting and ensure a room is no longer being used, you can delete a room via API request. Deleting a room will remove all participants and prevent any further use. You can also keep track of when a session (meeting) starts and ends via webhooks to limit a meeting by length.

Last updated