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

    Open channel

    Copy link

    This page shows webhook events related to open channels within your Sendbird application.


    open_channel:create

    Copy link

    This webhook event is invoked when an open channel is created. The following shows a webhook payload of an open_channel:create event.

    {
        "category": "open_channel:create",
        "created_at": 1540866408000,
        "operators": [
            {
                "user_id": "Jay",
                "nickname": "Mighty",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_26_512px.png",
                "metadata": {}
            }
        ],
        "channel": {
            "name": "Jeff and friends",
            "channel_url": "sendbird_open_channel_1_2681099203cd6b78414fe672927a43fcf3a30f09",
            "custom_type": "",
            "is_distinct": false,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    open_channel:remove

    Copy link

    This webhook event is invoked when an open channel is removed. The following shows a webhook payload of an open_channel:remove event.

    {
        "category": "open_channel:remove",
        "removed_at": 1586446261706,
        "channel": {
            "name": "Jeff and friends",
            "channel_url": "sendbird_open_channel_1_2681099203cd6b78414fe672927a43fcf3a30f09",
            "custom_type": "",
            "is_distinct": false,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    open_channel:enter

    Copy link

    This webhook event is invoked when a user enters an open channel. The following shows a webhook payload of an open_channel:enter event.

    {
        "category": "open_channel:enter",
        "entered_at": 1540867091314,
        "user": {
            "user_id": "Julia",
            "nickname": "Yogini",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_94_512px.png"
        },
        "channel": {
            "name": "Jeff and friends",
            "channel_url": "sendbird_open_channel_1_2681099203cd6b78414fe672927a43fcf3a30f09",
            "custom_type": "",
            "is_distinct": false,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    open_channel:exit

    Copy link

    This webhook event is invoked when a user exits an open channel. The following shows a webhook payload of an open_channel:exit event.

    {
        "category": "open_channel:exit",
        "entered_at": 1586446260031,
        "user": {
            "user_id": "Kern",
            "nickname": "Basketball Player",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_74_512px.png"
        },
        "channel": {
            "name": "Jeff and friends",
            "channel_url": "sendbird_open_channel_1_2681099203cd6b78414fe672927a43fcf3a30f09",
            "custom_type": "",
            "is_distinct": false,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    open_channel:message_send

    Copy link

    This webhook event is invoked when a message is sent within an open channel. The following shows a webhook payload of an open_channel:message_send event.

    TextFileAdmin
    {
        "category": "open_channel:message_send",
        "sender": {
            "user_id": "Jeff",
            "nickname": "Oldies but goodies",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_38_512px.png",
            "metadata": {}
        },
        "silent": false,
        "sender_ip_addr": "xxx.xxx.xxx.xx",
        "custom_type": "",
        "mention_type": "users",
        "mentioned_users": [],
        "type": "MESG", // `MESG` indicates a text message.
        "payload": {
            "message_id": 1918018535,
            "custom_type": "",
            "message": "This is the first message!",
            "translations": {
                "en": "",
                "de": "",
                ...
            },
            "created_at": 1484205447940,
            "data": ""
        },
        "channel": {
            "channel_url": "sendbird_open_channel_8_2cccb696d59d9acfecfd71580c97c34b5c19f040",
            "name": "Let's talk about old pops!",
            "custom_type": "hobby",
            "data": ""
        },
        "sdk": "Android",   // iOS, Android, JavaScript, .NET or API
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    open_channel:message_update

    Copy link

    This webhook event is invoked and delivered when one of the following message properties is updated: message, custom_type, data, mention_type, and mentioned_user_ids. The changes property in the payload contains the old and new values of the changed message properties. The following shows a webhook payload of an open_channel:message_update event.

    TextFileAdmin
    {
        "category": "open_channel:message_update",
        "sender": {
            "user_id": "Jeff",
            "nickname": "Oldies but goodies",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_38_512px.png",
            "metadata": {}
        },
        "changes": [
            {
                "key": "message",
                "old": "This is the first message!",
                "new": "This is my first message to you all!"
            }
        ],
        "custom_type": "",
        "mention_type": "users",
        "mentioned_users": [],
        "type": "MESG",  // `MESG` indicates a text message.
        "payload": {
            "message_id": 1918018535,
            "custom_type": "",
            "message": "This is my first message to you all!",
            "translations": {
                "en": "",
                "de": "",
                ...
            },
            "created_at": 1484205447940,
            "data": ""
        },
        "channel": {
            "name": "Let's talk about old pops!",
            "channel_url": "sendbird_open_channel_8_2cccb696d59d9acfecfd71580c97c34b5c19f040",
            "custom_type": "hobby",
            "data": ""
        },
        "sdk": "Android",    // iOS, Android, JavaScript, .NET or API
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    open_channel:message_delete

    Copy link

    This webhook event is invoked when a message is deleted from an open channel. The following shows a webhook payload of an open_channel:message_delete event.

    TextFileAdmin
    {
        "category": "open_channel:message_delete",
        "sender": {
            "user_id": "David",
            "nickname": "TallAndStrong",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_16_512px.png",
            "metadata": {}
        },
        "custom_type": "",
        "type": "MESG",
        "channel": {
            "name": "Talking about movies",
            "channel_url": "sendbird_open_channel_8_2cccb696d59d9acfecfd71580c97c34b5c19f040",
            "custom_type": "hobby",
            "data": ""
        },
        "payload": {
            "message_id": 238309772,
            "custom_type": "",
            "message": "Hi, this text message will be deleted.",
            "translations": {
                "en": "",
                "de": "",
                ...
            },
            "created_at": 0,
            "data": ""
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }