Chat / Platform API
Current version: v3
    Chat Platform API v3
    Chat Platform API
    Chat
    Platform API
    Home
    /
    Chat
    /
    Platform API

    Leave a channel

    Makes one or more members leave a group channel. See this page to learn more about channel types.

    Note: To let a user leave all of their group channels at once, use the Leave group channels API instead.


    HTTP request

    PUT https://api-{application_id}.sendbird.com/v3/group_channels/{channel_url}/leave
    

    Parameters

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    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
    RequiredTypeDescription

    user_ids[]

    array of strings

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

    OptionalTypeDescription

    should_leave_all

    boolean

    Determines whether to have all members leave the channel. If set to true, makes all members leave the channel. (Default: false)

    {
        "user_ids": ["Philip", "Matthew", "Janna"]
    }
    

    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.