Skip to main contentIBM Video Streaming Developers

Chat Rooms

List subrooms

GET https://api.video.ibm.com/channels/{channelId}/chat/rooms.json

Success response

Upon success, a response with HTTP status “200 OK” is returned with the following key-value pairs inside the rooms root array.

KEYTYPEDESCRIPTION
idstringRoom ID
namestringRoom name

Example of a success response:

{
"rooms": [
{
"id": "room_7dce3a5c-4ecd-4275-a4f9-c39aba521f02",
"name": "Artificial intelligence"
}
]
}

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
402 Payment Requiredinvalid_requestThe user does not have the streamchat benefit
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Add a subroom

POST https://api.video.ibm.com/channels/{channelId}/chat/rooms.json

Parameters

KEYTYPEIMPORTANCEDESCRIPTION
namestringREQUIREDName of the room

The Content-Type of the request should be application/x-www-form-urlencoded.

Example of the request:

POST /channels/1234/chat/rooms.json HTTP/1.1
Host: api.video.ibm.com
Authorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Content-Type: application/x-www-form-urlencoded
name=My%20room

Success response

Upon success, a response with HTTP status “200 OK” is returned with the following key-value pairs inside the room root object.

KEYTYPEDESCRIPTION
idstringRoom ID
namestringRoom name

Example of a success response:

{
"room": {
"id": "room_7dce3a5c-4ecd-4275-a4f9-c39aba521f02",
"name": "Artificial intelligence"
}
}

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad Requestbad_requestInvalid value was supplied
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
402 Payment Requiredinvalid_requestThe user does not have the streamchat benefit
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Rename a subroom

PUT https://api.video.ibm.com/channels/{channelId}/chat/rooms/{roomId}.json

Parameters

KEYTYPEIMPORTANCEDESCRIPTION
namestringREQUIREDNew name of the room

The Content-Type of the request should be application/x-www-form-urlencoded.

Example of the request:

PUT /channels/1234/chat/rooms/room_7dce3a5c-4ecd-4275-a4f9-c39aba521f02.json HTTP/1.1
Host: api.video.ibm.com
Authorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950
Content-Type: application/x-www-form-urlencoded
name=My%20room%20with%20a%20new%20name

Success response

Upon success, a response with HTTP status ““204” No content” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad Requestbad_requestInvalid value was supplied
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
402 Payment Requiredinvalid_requestThe user does not have the streamchat benefit
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Delete a subroom

DELETE https://api.video.ibm.com/channels/{channelId}/chat/rooms/{roomId}.json

Success response

Upon success, a response with HTTP status ““204” No content” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
402 Payment Requiredinvalid_requestThe user does not have the streamchat benefit
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request