Leave a channel
This action allows one or more members to leave a group channel. To let a user leave all of their group channels at once, use the leave group channels API instead.
Since this API can't be called for a deactivated user, ensure that the leave_all_when_deactivated
property of the user is set to its default value of true
to let the user leave all joined group channels upon deactivation.
HTTP request
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. |
Request body
The following table lists the properties of an HTTP request that this action supports.
Properties
Required | Type | Description |
---|---|---|
user_ids[] | array of strings | Specifies an array of one or more unique IDs of members to leave the channel. |
Optional | Type | Description |
---|---|---|
should_leave_all | boolean | Determines whether to have all members leave the channel. If set to |
should_remove_operator_status | boolean | Determines whether to remove a user from the channel's operator list if the user who is leaving the channel is an operator. (Default: |
reason | string | Specifies the reason for leaving a channel. Acceptable values are |
Responses
If successful, this action returns an empty response body.
Error
In the case of an error, an error object like below is returned. See the error codes section for more details.