Update status of a banned participant of an open channel
Updates information about a banned participant of an open channel. You can adjust the duration of the ban or update the description about the ban with this API.
HTTP request
Note: If you are using the in-app channel in Delight AI agent, the endpoint for your API request should start with
https://api-{application_id}.svc.delight.ai/v3instead ofhttps://api-{application_id}.sendbird.com/v3. For more details, refer to our Delight AI agent guide.
Parameters
The following table lists the parameters that this action supports.
Required
| Parameter name | Type | Description |
|---|---|---|
channel_url | string | Specifies the URL of a channel. |
banned_user_id | string | Specifies the unique ID of a banned user. |
Request body
The following table lists the properties of an HTTP request that this action supports.
Properties
| Required | Type | Description |
|---|---|---|
seconds | int | Specifies the duration of ban in seconds. If set to -1, a user will be banned for ten years, which refers to a permanent ban on the Sendbird Dashboard. (Default: -1) |
| Optional | Type | Description |
|---|---|---|
description | string | Specifies the reason for the ban. The maximum length is 250 characters. |
Response
If successful, this action returns a banned user resource and updated ban information in the response body.
List of response properties
| Property name | Type | Description |
|---|---|---|
user | object | The user resource that contains brief information about the banned user. |
start_at | long | The time when the user becomes banned in the channel. The value is in Unix milliseconds format. |
end_at | long | The timestamp of when the ban is scheduled to end. The value is in Unix milliseconds format. |
description | string | The reason for the ban. |
In the case of an error, an error object is returned. A detailed list of error codes is available here.