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

    Configure auto event message settings

    Determines whether to automatically send event messages to group channels when events take place in an application. You can choose which auto event message to receive on the Sendbird Dashboard.

    Note: As for the USER_LEAVE event, a set of new options are available on the Sendbird Dashboard in case you want more detailed information on why a user left a channel. You can find it under Settings > Chat > Channel > Auto message and select one of the options from the New version category.

    HTTP request

    PUT https://api-{application_id}.sendbird.com/v3/applications/settings/auto_event_message
    

    Request body

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

    Properties
    OptionalTypeDescription

    user_leave

    object

    a list of key-value items which describes different situations where a user leaves a channel and determines whether to send an auto event message for each case.

    deleted

    boolean

    (Deprecated) Determines whether to send an auto event message when a user is banned and kicked out from a channel or their account was deleted. (Default: false)

    This will be deprecated soon. Use admin_deleted or admin_removed instead.

    deactivated

    boolean

    (Deprecated) whether to send an auto event message when the value of is_active is set to false, which means deactivated, through Chat API.(Default: false)

    left

    boolean

    (Deprecated) Determines whether to send an auto event message when a user leaves a channel by choice. (Default: false)

    left_by_own_choice

    boolean

    Determines whether to send an auto event message when a user leaves a channel by choice. (Default: false)

    channel_operator_removed

    boolean

    Determines whether to send an auto event message when a channel operator bans a user through the Chat API or when a channel is deleted.(Default: false)

    admin_removed

    boolean

    Determines whether to send an auto event message when a user is banned and thus kicked out of a channel.(Default: false)

    admin_deleted

    boolean

    Determines whether to send an auto event message when a user is deleted through the Chat API. (Default: false)

    admin_deactivated

    boolean

    Determines whether to send an auto event message when the value of is_active is set to false, which means deactivated, through Chat API.(Default: false)

    user_join

    object

    a list of key-value items which describes different situations where a user joins a channel and determines whether to send an auto event message for each case.

    user_join

    boolean

    whether to send an auto event message when a user joins a channel. (Default: false)

    channel_create

    object

    a list of key-value items that describes different types of a channel and determines whether to send an auto event message for each case.(Default: false)

    public_channel

    boolean

    Determines whether to send an auto event message when a public group channel is created. (Default: false)

    private_channel

    boolean

    Determines whether to send an auto event message when a private group channel is created. (Default: false)

    channel_change

    object

    a list of key-value items that describes different situations where channel properties are changed and determines whether to send an auto event message for each case.

    channel_change

    boolean

    Determines whether to send an auto event message when channel properties such as custom_type and cover_url change.(Default: false)

    include_last_message

    boolean

    Determines whether to update the last_message property of a channel when an auto event message is sent. (Default: false)

    {
    "auto_event_message": {
        "user_leave": {
            "admin_removed": true,
            "admin_deleted": true,
            "admin_deactivated": true,
            "left_by_own_choice": true,
            "channel_operator_removed": true
        },
        "user_join": {
            "user_join": true
        },
        "channel_create": {
            "public_channel": true,
            "private_channel": true
        },
        "channel_change": {
            "channel_change": false
        }
    }
    

    Response

    If successful, this action returns a list of auto event messages that the specified application will receive in the response body.

    {
    "auto_event_message": {
        "user_leave": {
            "admin_removed": true,
            "admin_deleted": true,
            "admin_deactivated": true,
            "left_by_own_choice": true,
            "channel_operator_removed": true
        },
        "user_join": {
            "user_join": true
        },
        "channel_create": {
            "public_channel": true,
            "private_channel": true
        },
        "channel_change": {
            "channel_change": false
        }
    }