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

    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 Sendbird Dashboard in case you want more detailed information on why a user left a channel. You can find it under Settings > Chat > Channels > 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.

    user_leave.left_by_own_choice

    boolean

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

    user_leave.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)

    user_leave.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)

    user_leave.admin_deleted

    boolean

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

    user_leave.admin_deactivated

    boolean

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

    user_join

    object

    An object containing a key-value item of user_join. The item's boolean value determines whether to send an auto event message when a user joins a channel. See the request body example below. (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)

    channel_create.public_channel

    boolean

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

    channel_create.private_channel

    boolean

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

    channel_change

    object

    An object containing a key-value item of channel_change. The item's boolean value determines whether to send an auto event message when channel properties such as custom_type and cover_url change. See the request body example below for more details. (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)

    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)

    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)

    {
    "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
        }
    }