/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    Leave group channels

    Copy link

    This action allows a user to leave all group channels or channels with a specific custom type. This API is useful if you want to let a user leave a set of channels at once. To let a user leave only one of their group channels, use the leave a channel 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

    Copy link
    PUT https://api-{application_id}.sendbird.com/v3/users/{user_id}/my_group_channels/leave
    

    Parameters

    Copy link

    The following table shows a parameter that this action supports.

    Required
    Parameter nameTypeDescription

    user_id

    string

    Specifies the unique ID of the user.


    Request body

    Copy link

    The following table shows a property of the HTTP request that this action supports.

    Optional
    Property nameTypeDescription

    custom_type

    string

    Specifies a custom channel type. Only one custom type can be specified.

    {
        "custom_type": "art"
    }
    

    Responses

    Copy link

    If successful, this action returns an empty response body.

    In the case of an error, an error object like below is returned. See the error codes section for more details.

    {
        "message": "\"User\" not found.",
        "code": 400201,
        "error": true
    }