Documentation

Room API

You can also manage rooms via API.

Create room

Endpoint https://chatbackend.watchers.io/external/room
Method POST Body application/json

ParameterTypeRequiredDescription
roomIdstringYesUnique room ID.
namestringYesRoom name shown in the admin panel.
aboutstringYesRoom description (e.g., used for scheduled rooms).
isSpeakboolean | "true" | "1"NoEnables voice chat in the room. String values "true"/"1" are accepted and cast to true.
picstringNoOptional. URL of the room picture/avatar.
startTimestring (ISO 8601)NoPlanned room start time in UTC. Use format YYYY-MM-DDTHH:mm:ss.sssZ.
endTimestring (ISO 8601)NoPlanned room end time in UTC. Use format YYYY-MM-DDTHH:mm:ss.sssZ.
streamUrlstringNoOptional. External livestream URL (Vimeo, YouTube Live, etc.).
sourceUrlstringNoOptional. Origin/ingest stream source (e.g., RTMP).
streamStartTimestring (ISO 8601)NoOptional. Actual/planned stream start time in UTC (…Z).
streamEndTimestring (ISO 8601)NoOptional. Actual/planned stream end time in UTC (…Z).

Notes

  • All time values must be in UTC (ISO 8601) with the Z suffix, e.g. 2025-08-14T09:00:00.000Z.
  • If startTime is provided, the room will be created with status SOON and will automatically switch to LIVE at the specified time.
  • If endTime is provided, the room will automatically switch to ENDED at the specified time.
  • If streamUrl is provided, an embedded video player will be shown in the room on the frontend.
curl -X 'POST' \
  'https://chatbackend.watchers.io/external/room' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {Api key of project from admin panel}' \
  -H 'Authorization: Bearer {Bearer token from admin panel}' \
  -d '{
    "roomId": "liveevent123",
    "name": "Live Conference",
    "about": "Annual keynote",
    "isSpeak": "true",
    "pic": "https://cdn.example.com/rooms/123.png",
    "startTime": "2025-08-14T09:00:00.000Z",
    "endTime": "2025-08-14T10:00:00.000Z",
    "streamUrl": "https://player.vimeo.com/video/12345678",
    "sourceUrl": "rtmp://origin.example.com/live/abc",
    "streamStartTime": "2025-08-14T09:02:15.000Z",
    "streamEndTime": "2025-08-14T09:58:44.000Z"
  }'

Get room

Endpoint https://chatbackend.watchers.io/external/room/:roomId
Method GET

Path parameter

ParameterTypeRequiredDescription
roomIdstringYesUnique room ID.
curl -X 'GET' \
  'https://chatbackend.watchers.io/external/room/321textroom321' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {Api key of project from admin panel}' \
  -H 'Authorization: Bearer {Bearer token from admin panel}'

Enable Voice in room

Endpoint https://chatbackend.watchers.io/external/room/speak
Method POST Body application/json


ParameterTypeRequiredDescription
roomIdstringYesUnique room ID.
isSpeakboolean | "true" | "1"YesEnables or disables voice in the room. String values "true"/"1" are accepted and cast to true.
curl -X 'POST' \
  'https://chatbackend.watchers.io/external/room/speak' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {Api key of project from admin panel}' \
  -H 'Authorization: Bearer {Bearer token from admin panel}' \
  -d '{
    "roomId": "321textroom321",
    "isSpeak": false
  }'

Change room status

Endpoint https://chatbackend.watchers.io/external/room/status
Method POST Body application/json

ParameterTypeRequiredDescription
roomIdstringYesRoom ID.
statusenumYesOne of: LIVE, SOON, ENDED, DISABLED.
streamUrlstringNoOptional. Update external video URL.
curl -X 'POST' \
  'https://chatbackend.watchers.io/external/room/status' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {Api key of project from admin panel}' \
  -H 'Authorization: Bearer {Bearer token from admin panel}' \
  -d '{
    "roomId": "321textroom321",
    "status": "LIVE",
    "streamUrl": "https://player.vimeo.com/video/87654321"
  }'

Delete room

Endpoint https://chatbackend.watchers.io/external/room/:roomId
Method DELETE

Path parameter

ParameterTypeRequiredDescription
roomIdstringYesUnique room ID.
curl -X 'DELETE' \
  'https://chatbackend.watchers.io/external/room/321textroom321' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {Api key of project from admin panel}' \
  -H 'Authorization: Bearer {Bearer token from admin panel}'

Changelog (this version)

  • Added optional fields: pic, sourceUrl, streamStartTime, streamEndTime.
  • isSpeak made optional on Create room; accepts boolean or "true"/"1".
  • Clarified time format: ISO 8601 UTC YYYY-MM-DDTHH:mm:ss.sssZ.
  • Kept existing endpoints and behavior unchanged.

What’s Next