Ban users from channels by a custom channel type
Bans users from channels with the specified custom channel type at once.
Note: To learn more about other available moderation tools, see Moderation Overview.
HTTP Request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
custom_type | string | Specifies a custom channel type. |
Request body
The following table lists the properties of an HTTP request that this action supports.
Properties
Required | Type | Description |
---|---|---|
banned_list[] | array of objects | An array of |
(ban).user_id | string | Specifies the unique ID of a user. |
Optional | Type | Description |
---|---|---|
(ban).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) |
(ban).description | string | Specifies the reason for ban. The maximum length is 250 characters. |
on_demand_upsert | boolean | Determines whether the Sendbird system should create new users to ban if there are no users with the IDs specified in |
Response
If successful, this action returns an empty response body.
In the case of an error, an error object is returned. A detailed list of error codes is available here.