Group call
This page explains the key functions of group call consisting of how to create a room and how a user can participate in a group call by entering and exiting a room.
Note: Right now, the Rooms API for group call supports retrieving rooms and participants in rooms. Other actions should be done from Sendbird Calls SDK.
Resource representation
The following table shows the list of properties in a group call resource.
List of room properties
Property name | Type | Description |
---|---|---|
room_id | string | A unique identifier for the room. |
room_type | string | The type of a room. A type indicates the room type as audio or video and the capacity of a room. Valid values are large_room_for_audio_only which can hold up to 100 participants and small_room_for_video which can hold up to 6 participants. |
created_at | long | The timestamp of when the room was created, in Unix milliseconds. |
updated_at | long | The timestamp of when the room information was updated, in Unix milliseconds. |
state | string | The state of the room. Valid values are the following: |
created_by | string | The user ID of the user who created the room. If the room is created with the Platform API, an empty string will be returned. |
deleted_by | string | The user ID of the user who deleted the room. If the room is deleted with the Platform API, an empty string will be returned. |
current_participants[] | list | The users who are currently in the room. |
custom_items | nested object | Specifies a |
List of participant properties
Property name | Type | Description |
---|---|---|
room_id | string | A unique identifier for the room. |
participant_id | string | A unique identifier for the participant. |
entered_at | long | The timestamp of when the participant entered the room, in Unix milliseconds. |
updated_at | long | The timestamp of when the participant information was updated within the room, in Unix milliseconds. |
exited_at | Nullable[long] | The timestamp of when the participant exited the room, in Unix milliseconds. |
duration | Nullable[long] | The period from the time when the participant entered the room to the time the participant left the room, measured in seconds. |
connected_at | Nullable[long] | The timestamp of when the participant connected to the room and began streaming media, in Unix milliseconds. |
client_id | string | The unique ID of the client. |
state | string | The state of the participant. Valid values are the following: |
user | User | The user who can access all features of the room. |
is_audio_on | bool | Indicates whether the participant has turned on their audio. |
is_video_on | bool | Indicates whether the participant has turned on their video. |
Actions
- API endpoints are relative to the base URL allocated to your application. In this page, the
/rooms
endpoint refers tohttps://api-{application_id}.calls.sendbird.com/v1/rooms
.
Note: If you want to know your application ID, sign in to your dashboard, go to the Settings > Application > General, and then check the Application ID.
- It's recommended that the parameter values in API URLs be urlencoded, such as
{user_id}
.
List of actions
Action | HTTP request |
---|---|
| |
| |
| |
| |
| |
| |
| |
|
Create a room
Creates a room for group calls.
HTTP request
Request body
The following table lists the properties of an HTTP request that this action supports.
Parameters
Required | Type | Description |
---|---|---|
type | string | Specifies the type of the room. Acceptable values are the following: |
Optional | Type | Description |
---|---|---|
custom_items | nested object | Specifies a |
Response
If successful, this action returns a list of room resources in the response body.
Delete a room
Deletes a specific room. Once a room is deleted, the current participants are removed from the room and the room can't be reopened. Users can retrieve a deleted room, but can't enter it. Also, the custom items of the deleted room can be retrieved, but can't be updated or deleted.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Parameters
Required | Type | Description |
---|---|---|
room_id | string | The unique ID of the target room. |
Response
If successful, this action returns a list of room resources in the response body.
Retrieve a list of rooms
Retrieves all rooms within the application. The retrieved list of rooms are sorted in reverse order, meaning the newest room appears first and the oldest last.
HTTP request
Parameters
The following table lists the properties of an HTTP request that this action supports.
Optional
Parameter name | Type | Description |
---|---|---|
limit | string | Specifies the number of results to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10) |
next | string | Specifies the value of the next property in the response to retrieve the next page in the result set. |
type | type | Restricts the search scope to only retrieve rooms of which the type matches any of the specified values. Acceptable values are all, large_room_for_audio_only, and small_room_for_video. (Default: all) |
room_ids | string | Searches for rooms which the specified room IDs are included in the parameter value. The string should consist of multiple URL encoded room IDs separated by commas. |
state | string | Restricts the search scope to only retrieve rooms of which state matches any of the specified value. Acceptable values are open and deleted. |
created_at_start_date | int | Specifies the value of time period to restrict the search scope to only retrieve rooms of which the room's |
created_at_end_date | int | Specifies the value of time period to restrict the search scope to only retrieve rooms of which the room's |
current_participant_range_gte | int | Specifies the number of current participants to restrict the search scope to only retrieve rooms which the number of participants is equal to or greater than the specified value. The search scope may be specified in conjunction with the |
current_participant_range_lte | int | Specifies the number of current participants to restrict the search scope to only retrieve rooms which the number of participants is equal to or less than the specified value. The search scope may be specified in conjunction with the |
created_by_user_ids | string | Searches for rooms which the specified user IDs of users who created rooms are included in the parameter value. The string should consist of multiple URL encoded user IDs separated by commas. |
Response
If successful, this action returns a list of room resources in the response body.
List of response properties
Property name | Type | Description |
---|---|---|
rooms[] | list | A list of rooms. |
Nullable[string] | The value for the next parameter to retrieve the next page in the result set. |
Retrieve a room
Retrieves a specific room.
HTTP request
Parameters
The following table lists the properties of an HTTP request that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
room_id | string | Specifies the unique ID of the target room. |
Response
If successful, this action returns a list of room resources in the response body.
Retrieve all custom items of a room
Retrieves all custom items of a specific room. A room can have custom key-value items which store additional information for the room.
Note: When a room is created, its custom items have no values by default.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
room_id | string | The unique ID of the target room. |
Response
If custom items already exist in the target room, this action returns the custom items including the updated or newly added ones in the response body.
List of response properties
Property name | Type | Description |
---|---|---|
custom_items | nested object | The custom items including the updated or newly added ones. |
affected_at | long | The time of when the specified custom items have been updated, in Unix milliseconds. If custom items do not exist in the target room, |
Update custom items of a room
Updates custom items of a specific room. A room can have custom key-value items which store additional information for the room.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
room_id | string | The unique ID of the target room. |
Request body
The following table lists the properties of an HTTP request that this action supports.
Properties
Required | Type | Description |
---|---|---|
custom_items | nested object | Specifies a |
Optional | Type | Description |
---|---|---|
mode | string | Determines whether to update the existing custom items or add new custom items. Acceptable values are the following: |
Response
If successful, this action returns custom items including the updated or newly added ones in the response body.
List of response properties
Property name | Type | Description |
---|---|---|
room_id | string | The unique ID of the target room. |
updated | array | An array of the keys for updated custom items. |
custom_items | nested object | The custom items including the updated or newly added ones. |
affected_at | long | The time of when the specified custom items have been updated, in Unix milliseconds. |
Delete custom items of a room
Deletes custom items of a specific room.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
room_id | string | The unique ID of the target room. |
Request body
The following table lists the properties of an HTTP request that this action supports.
Optional
Property name | Type | Description |
---|---|---|
keys | array | Specifies the keys of custom items to delete. If not specified, all custom items of the room are deleted. |
Response
If successful, this action returns custom items excluding the deleted ones in the response body.
List of response properties
Property name | Type | Description |
---|---|---|
room_id | string | The unique ID of the target room. |
deleted | array | An array of the keys for deleted custom items. |
custom_items | nested object | The custom items excluding the deleted custom items. |
affected_at | long | The time of when the specified custom items have been deleted, in Unix milliseconds. |
Retrieve a list of participants within the room
Retrieves all participants that were created in the room. The retrieved list of participants are sorted in reverse order, meaning the newest participant appears first and the oldest last.
HTTP request
Parameters
The following table lists the properties of an HTTP request that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
limit | string | Specifies the number of results to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10) |
Optional
Parameter name | Type | Description |
---|---|---|
next | string | Specifies the value of the next property in the response to retrieve the next page in the result set. |
Response
If successful, this action returns a list of participant resources in the response body.