Group channel

Leave a channel

Makes one or more members leave a group channel.

https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-leave-a-channel

put/v3/group_channels/{channel_url}/leave

Request

  • Base URL
    https://api-APP_ID.sendbird.com
  • Auth
    none declared

Path parameters

channel_urlstring required

Headers

Api-Tokenstring

Request body

user_idsstring[] required

Specifies an array of one or more IDs of the users to leave the channel.

should_leave_allboolean

Determines whether to make all members leave the channel. (Default: false)

should_remove_operator_statusboolean

Determines whether to remove a user from the channel's operator list if the user who is leaving the channel is an operator. (Default: false)

reason'LEFT_BY_OWN_CHOICE' | 'CHANNEL_OPERATOR_REMOVED' | 'ADMIN_REMOVED' | 'ADMIN_DELETED' | 'ADMIN_DEACTIVATED'

Specifies the reason for leaving a channel. Acceptable values are admin_removed, admin_deleted, admin_deactivated, left_by_own_choice, and channel_operator_removed.

Response

Successful response

EmptyObjectResponse required

Changes

    • warning

      removed the request property

    • warning

      removed the optional property anyOf from the response with the status

    • info

      api operation id gcLeaveChannel removed and replaced with leaveAChannel

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property became optional

    • info

      the header request parameter Api-Token became optional