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

    Update channel invitation preference

    Updates a user's group channel invitation preference. See this page to learn more about channel types.

    Note: Updating the application's default channel invitation preference won't override existing users' individual channel invitation preferences. The changed preference only affects users created after the update.


    HTTP request

    PUT https://api-{application_id}.sendbird.com/v3/users/{user_id}/channel_invitation_preference
    

    Request body

    The following table lists the properties of an HTTP request that this action supports.

    Required
    Property nameTypeDescription

    auto_accept

    boolean

    Determines for the user whether or not to automatically join a group channel promptly from an invitation without having to accept it. If set to false, users can accept or decline an invitation to join a group channel. (Default: true)


    Response

    If successful, this action returns the value of the channel invitation preference of the user in the response body.

    {
        "auto_accept": true
    }
    

    In the case of an error, an error object is returned. A detailed list of error codes is available here.