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

    Update channel invitation preference

    Copy link

    This action updates a user's group channel invitation preference. Updating the application's default channel invitation preference won't override existing users' individual channel invitation preferences. The changed preference only affects the users created after the update.


    HTTP request

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

    Request body

    Copy link

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

    Required
    Property nameTypeDescription

    auto_accept

    boolean

    Determines whether a user will automatically join a group channel without having to manually accept an invitation. If set to false, the user must choose to accept or decline the invitation to join a group channel. (Default: true)


    Responses

    Copy link

    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 like below is returned. See the error codes section for more details.

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