Whitelabeling: Theme Management for Meeting Rooms

Use the Meetings API to create custom themes with different colors, logos, and text. Themes can be applied to one room, a few rooms, or all the meeting rooms in your application.

Prerequisites

  • Vonage Developer Account: If you do not already have one, sign-up for a free account on the Vonage Developers Account.

  • Application ID and Secret: Once you’re logged in to the Vonage API Dashboard, click on Applications and create a new Application. Click Generate public and private key and record the private key. You'll be using the private key with the Application ID to Generate a JSON Web Token (JWT). For further details about JWTs, please see Authentication. Also ensure that the Meetings API is enabled for your application under 'Capabilities':

Enable the Meetings API for your application using the dashboard

Create a Theme

POST
: https://api-eu.vonage.com/v1/meetings/themes

Body Content

The following fields can be assigned values in the POST request:

FieldRequired?Description
theme_nameNoThe name of the theme (must be unique). If null, a UUID will automatically be generated.
main_colorYesThe main color that will be used for the meeting room.
brand_textYesThe text that will appear on the meeting homepage, in the case that there is no brand image.
short_company_urlNoThe URL that will represent every meeting room with this theme (must be unique).

Example Request

The following example will create a theme with orange as the main color and a display text of "Orange". The theme name is used internally and must be unique for each theme.

curl -X POST 'https://api-eu.vonage.com/v1/meetings/themes' \-H 'Content-Type: application/json' \-H 'Authorization: Bearer '$JWT \-d '{ "main_color": "#ff6500", "brand_text": "Orange", "theme_name": "orange-room", }'

Example Response

{
    "theme_id": "49d900c8-372b-4c9e-b682-5601cbdc1f7a",
    "theme_name": "orange-room",
    "domain": "VCP",
    "account_id": "123ab4cd",
    "application_id": "921a6f5b-1f94-49f4-8107-26f0c75fc6e7",
    "main_color": "#ff6500",
    "short_company_url": null,
    "brand_text": "Orange",
    "brand_image_colored": null,
    "brand_image_white": null,
    "branded_favicon": null,
    "brand_image_white_url": null,
    "brand_image_colored_url": null,
    "branded_favicon_url": null
}

Note that the null values represent theme images that can be added using the image management process. The URLs that will be generated once those images are uploaded.

Update a Theme

PATCH: https://api-eu.vonage.com/v1/meetings/themes/:theme_id

Theme properties that can be updated are the same as those that can be set upon create. All images must be added via the image management process.

To update properties, you'll need the theme_id and an object called update_details:

Example Request

curl -X PATCH 'https://api-eu.vonage.com/v1/meetings/themes/86da462e-fac4-4f46-87ed-63eafc81be48' \-H 'Authorization: Bearer '$JWT \-H 'Content-Type: application/json' \-d '{ "update_details": { "theme_name": "Theme1", "main_color": "#12f64e", "brand_text": "Brand", "short_company_url": "short-url" }}'

Example Response

{
   "theme_id": "ef2b46f3-8ebb-437e-a671-272e4990fbc8",
   "theme_name": "Theme1",
   "domain": "VCP",
   "account_id": "123ab4cd",
   "application_id": "921a6f5b-1f94-49f4-8107-26f0c75fc6e7",
   "main_color": "#12f64e",
   "short_company_url": "short-url",
   "brand_text": "Brand",
   "brand_image_colored": "branded-image-colored",
   "brand_image_white": "branded-image-white",
   "branded_favicon": "branded-favicon",
   "brand_image_colored_url": "branded-image-colored-url",
   "brand_image_white_url": "branded-image-white-url",
   "branded_favicon_url": "branded-favicon-url"
}

Get a Theme

GET
: https://api-eu.vonage.com/v1/meetings/themes/:theme_id

Send a

GET
request to see all details for a theme:

Example Request

curl -X GET 'https://api-eu.vonage.com/v1/meetings/themes/ef2b46f3-8ebb-437e-a671-272e4990fbc8' \-H 'Authorization: Bearer '$JWT

Example Response

{
   "theme_id": "ef2b46f3-8ebb-437e-a671-272e4990fbc8",
   "theme_name": "Theme1",
   "domain": "VCP",
   "account_id": "123ab4cd",
   "application_id": "921a6f5b-1f94-49f4-8107-26f0c75fc6e7",
   "main_color": "#12f64e",
   "short_company_url": "short-url",
   "brand_text": "Brand",
   "brand_image_colored": "branded-image-colored",
   "brand_image_white": "branded-image-white",
   "branded_favicon": "branded-favicon",
   "brand_image_colored_url": "branded-image-colored-url",
   "brand_image_white_url": "branded-image-white-url",
   "branded_favicon_url": "branded-favicon-url"
}

Add a Theme to a Room

A theme can be applied to a Long Term room upon room creation or update.

Room Creation

POST
: https://api-eu.vonage.com/v1/meetings/rooms

This example will create a long term meeting room with the orange theme:

curl -X POST 'https://api-eu.vonage.com/v1/meetings/rooms' \-H 'Authorization: Bearer '$JWT \-H 'Content-Type: application/json' \-d '{ "display_name":"New Meeting Room", "type":"long_term", "expires_at":"$EXPIRY_DATE", "theme_id": "e8b1d80b-8f78-4578-94f2-328596e01387"}'

Room Update

PATCH: https://api-eu.vonage.com/v1/meetings/rooms/{ROOM_ID}

To update a room's theme, you'll need the theme_id and room ID:

curl -X PATCH 'https://api-eu.vonage.com/v1/meetings/rooms/9f6fe8ae-3458-4a72-b532-8276d5533e97' \-H 'Authorization: Bearer '$JWT \-H 'Content-Type: application/json' \-d '{ "update_details": { "theme_id": "e8b1d80b-8f78-4578-94f2-328596e01387" } }

Remove a Theme from a Room

PATCH: https://api-eu.vonage.com/v1/meetings/rooms/{ROOM_ID}

In order to remove a theme for a room, update the room using a PATCH request and the room ID. Update the theme_id with null to remove the theme and use the default theme instead.

Please note that only long term rooms can be updated.

Example Request

curl -X PATCH 'https://api-eu.vonage.com/v1/meetings/rooms/9f6fe8ae-3458-4a72-b532-8276d5533e97' \-H 'Content-Type: application/json' \-H 'Authorization: Bearer '$JWT \-d '{ "update_details": { "theme_id": "null" } }'

Set Theme as Default

PATCH: https://api-eu.vonage.com/v1/meetings/applications

A theme can be set as the default theme for the application, meaning that every room created will automatically use the default theme. To do this, first create a theme, and then add it as the default_theme_id in an object called update_details.

Example Request

curl -X PATCH 'https://api-eu.vonage.com/v1/meetings/applications' \-H 'Authorization: Bearer '$JWT \-d '{ "update_details": { "default_theme_id": "e8b1d80b-8f78-4578-94f2-328596e01387" }}'

Example Response

{
    "application_id":"3db604ce-b4c0-48f4-8b82-4a03ac9f6bk7",
    "account_id":"69b2a6d2",
    "default_theme_id":"e8b1d80b-8f78-4578-94f2-328596e01387"
}

Delete a Theme

DELETE
: https://api-eu.vonage.com/v1/meetings/themes/{THEME_ID}

To delete a theme, send a DELETE request using the theme ID. Please note, a theme that is set to default or is currently in use by any room cannot be deleted, and will return an error.

In order to delete a theme that is in use, you must remove it from each room that is using it by finding all rooms using that theme and removing the theme.

Alternatively, if you wish to override and delete the theme without manually removing it, add a query parameter of force=true. The default theme will now be applied to all the rooms that were using this theme.

curl -X DELETE 'https://api-eu.vonage.com/v1/meetings/themes/e8b1d80b-8f78-4578-94f2-328596e01387?force=true'

Get All Rooms with a Given Theme

GET
: https://api-eu.vonage.com/v1/meetings/themes/{THEME_ID}/rooms

To retrieve a list of rooms using a particular theme, send a

GET
request using the theme_id:

Example Request

curl -X GET 'https://api-eu.vonage.com/v1/meetings/themes/e8b1d80b-8f78-4578-94f2-328596e01387/rooms' \-H 'Authorization: Bearer $JWT'

This will return a list of all rooms using this theme.

Reference