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

    Group channel

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


    group_channel:create

    This webhook event is invoked when a group channel with invited members is created through the Chat API or SDKs. For members who have already been invited to the group channel, the group_channel:invite webhook isn't invoked.

    Once this webhook is delivered, the group_channel:join webhook is invoked. The following shows a webhook payload of a group_channel:create event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    {
        "category": "group_channel:create",
        "created_at": 1540867938000,
        "members": [
            {
                "user_id": "Glen",
                "nickname": "YoungAndTall",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_52_512px.png",
                "is_active": true,
                "is_online": false,
                "is_hidden": 0,
                "state": "invited", // The value can be either "joined" or "invited."
                "unread_message_count": 0,
                "total_unread_message_count": 0,
                "channel_unread_message_count": 0,
                "channel_mention_count": 0,
                "push_enabled": false,
                "push_trigger_option": "default",
                "do_not_disturb": false,
                "metadata": {}
            },
            ... # More members
        ],
        "inviter": {
            "user_id": "David",
            "nickname": "TallAndStrong",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_30_512px.png",
            "metadata": {}
        },
        "channel": {
            "name": "Sport center members",
            "channel_url": "sendbird_group_channel_6122393_1379dd647e15ddb2471c933794b6cb4651498933",
            "cover_url": "https://sendbird.com/main/img/cover/cover_43.jpg",
            "custom_type": "personal",
            "is_distinct": true,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:changed

    This webhook event is invoked and delivered when one of the following group channel properties has been changed: name and cover_url. The changes property in the payload contains the old and new values of the changed channel properties. The following shows a webhook payload of a group_channel:changed event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    {
        "category": "group_channel:changed",
        "changed_by": {
            "user_id": "636cc89ac19444128724b1264ebf709c",
            "nickname": "",
            "profile_url": "",
            "metadata": {}
        },
        "app_id": "41969B50-BD1C-47F1-A77B-2BF0C81A16EF",
        "changed_at": 1650574724505,
        "changes": [
            {
            "new": "383544c2e23e4cc4a48d47659c3530f0",
            "old": "Group Channel",
            "key": "name"
            }
        ],
        "channel": {
            "is_distinct": false,
            "name": "383544c2e23e4cc4a48d47659c3530f0",
            "custom_type": "",
            "is_ephemeral": false,
            "channel_url": "sendbird_group_channel_17_c836317073e2fd0dabd76ba646e5f960102c9da4",
            "is_public": false,
            "is_discoverable": false,
            "is_super": false,
            "data": ""
        }
    }
    

    group_channel:remove

    This webhook event is invoked when a group channel is removed. The following shows a webhook payload of a group_channel:remove event.

    {
        "category": "group_channel:remove",
        "removed_at": 1586446452882,
        "channel": {
            "name": "Sport center members - welcome everyone!",
            "channel_url": "sendbird_group_channel_6122393_1379dd647e15ddb2471c933794b6cb4651498933",
            "custom_type": "personal",
            "is_distinct": true,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:invite

    This webhook event is invoked when a user invites another user. The following shows a webhook payload of a group_channel:invite event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    {
        "category": "group_channel:invite",
        "invited_at": 1586444709368,
        "members": [
            {
                "user_id": "Glen",
                "nickname": "YoungAndTall",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_52_512px.png",
                "is_active": true,
                "is_online": false,
                "is_hidden": 0,
                "state": "joined",  // The value can be either `joined` or `invited`.
                "unread_message_count": 9,
                "total_unread_message_count": 9,
                "channel_unread_message_count": 0,
                "channel_mention_count": 0,
                "push_enabled": false,
                "push_trigger_option": "default",
                "do_not_disturb": false,
                "metadata": {}
            },
            ... # More members
        ],
        "inviter": {
            "user_id": "David",
            "nickname": "TallAndStrong",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_30_512px.png",
            "metadata": {}
        },
        "channel": {
            "name": "Sport center members - welcome everyone!",
            "channel_url": "sendbird_group_channel_6122393_1379dd647e15ddb2471c933794b6cb4651498933",
            "custom_type": "personal",
            "is_distinct": true,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "invitees": [
            {
                "user_id": "Mark",
                "nickname": "Passion Man",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_01_512px.png",
                "is_hidden": 0,
                "metadata": {}
            },
            {
                "user_id": "Daniel",
                "nickname": "Nice Guy",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_22_512px.png",
                "is_hidden": 0,
                "metadata": {}
            }
        ],
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:decline_invite

    This webhook event is invoked when a user declines an invitation. The users property indicates the members who have declined invitations and are in pending status. The following shows a webhook payload of a group_channel:decline_invite event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    {
        "category": "group_channel:decline_invite",
        "declined_invite_at": 1586446887080,
        "members": [
            {
                "user_id": "Glen",
                "nickname": "YoungAndTall",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_52_512px.png",
                "is_active": true,
                "is_online": false,
                "is_hidden": 0,
                "state": "invited", // The value can be either `joined` or `invited`.
                "unread_message_count": 9,
                "total_unread_message_count": 9,
                "channel_unread_message_count": 0,
                "channel_mention_count": 0,
                "push_enabled": false,
                "push_trigger_option": "default",
                "do_not_disturb": false,
                "metadata": {}
            },
            ... # More members
        ],
        "channel": {
            "name": "Sport center members - welcome everyone!",
            "channel_url": "sendbird_group_channel_6122393_1379dd647e15ddb2471c933794b6cb4651498933",
            "custom_type": "personal",
            "is_distinct": true,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "users": [  # Users who have declined the invitation to the channel
            {
                "user_id": "Jeff",
                "nickname": "Oldies but goodies",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_38_512px.png",
                "inviter": {
                    "user_id": "David",
                    "nickname": "TallAndStrong",
                    "profile_url": "https://sendbird.com/main/img/profiles/profile_30_512px.png",
                    "metadata": {}
                },
                "metadata": {}
            }
        ],
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:join

    This webhook event is invoked when a user joins a group channel. The users property indicates the members who have joined channels while the auto-accept is on or accepted invitations. The following shows a webhook payload of a group_channel:join event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    {
        "category": "group_channel:join",
        "joined_at": 1586445400845,
        "members": [
            {
                "user_id": "Aaron",
                "nickname": "Singer-songwriter",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_30_512px.png",
                "is_active": true,
                "is_online": false,
                "is_hidden": 0,
                "state": "joined",  // The value can be either `joined` or `invited`.
                "unread_message_count": 9,
                "total_unread_message_count": 9,
                "channel_unread_message_count": 0,
                "channel_mention_count": 0,
                "push_enabled": false,
                "push_trigger_option": "default",
                "do_not_disturb": false,
                "metadata": {}
            },
            ... # More members
        ],
        "channel": {
            "name": "Sport center members - welcome everyone!",
            "channel_url": "sendbird_group_channel_6122393_1379dd647e15ddb2471c933794b6cb4651498933",
            "custom_type": "personal",
            "is_distinct": true,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "users": [  # Users who have joined the channel
            {
                "user_id": "Glen",
                "nickname": "YoungAndTall",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_52_512px.png",
                "inviter": {
                    "user_id": "David",
                    "nickname": "TallAndStrong",
                    "profile_url": "https://sendbird.com/main/img/profiles/profile_30_512px.png",
                    "metadata": {}
                },
                "metadata": {}
            },
            ... # More users
        ],
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:leave

    This webhook event is invoked when a user leaves a group channel. The users property indicates those who have left a group channel, whereas the members indicates those who still remain in the channel. The channel_unread_message_count is a value for a user's unread message count of the channel when the user left. The following shows a webhook payload of a group_channel:leave event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    {
        "category": "group_channel:leave",
        "left_at": 1586446452882,
        "members": [
            {
                "user_id": "Glen",
                "nickname": "YoungAndTall",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_52_512px.png",
                "is_active": true,
                "is_online": false,
                "is_hidden": 0,
                "state": "joined",  // The value can be either `joined` or `invited`.
                "unread_message_count": 9,
                "total_unread_message_count": 9,
                "channel_unread_message_count": 0,
                "channel_mention_count": 0,
                "push_enabled": false,
                "push_trigger_option": "default",
                "do_not_disturb": false,
                "metadata": {}
            },
            ... # More members
        ],
        "channel": {
            "name": "Sport center members - welcome everyone!",
            "channel_url": "sendbird_group_channel_6122393_1379dd647e15ddb2471c933794b6cb4651498933",
            "custom_type": "personal",
            "is_distinct": true,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "users": [  # Users who have left the channel
            {
                "user_id": "Jeff",
                "nickname": "Oldies but goodies",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_38_512px.png",
                "channel_unread_message_count": 2,
                "metadata": {}
            }
        ],
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:message_send

    This webhook event is invoked when a message is sent within a group channel. The following shows a webhook payload of a group_channel:message_send event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    TextFileAdmin
    {
        "category": "group_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": [],
        "members": [
            {
                "user_id": "Jeff",
                "nickname": "Oldies but goodies",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_38_512px.png",
                "is_active": true,
                "is_online": false,
                "is_hidden": 0,
                "state": "joined",  # joined or invited
                "is_blocking_sender": false,
                "is_blocked_by_sender": false,
                "unread_message_count": 16,
                "total_unread_message_count": 16,
                "channel_unread_message_count": 5,
                "channel_mention_count": 0,
                "push_enabled": false,
                "push_trigger_option": "default",
                "do_not_disturb": false,
                "metadata": {}
            },
            ... # More members
        ],
        "type": "MESG", # Text message
        "payload": {
            "message_id": 238303376,
            "custom_type": "",
            "message": "I have a suggestion for our team.",
            "translations": {
                "en": "",
                "de": "",
                ...
            },
            "created_at": 1540798555343,
            "data": ""
        },
        "channel": {
            "name": "Sendbird engineers talking room",
            "channel_url": "sendbird_group_channel_47226288_21c0d617e45a7db4e12a7f5efdb4df4743b11c16",
            "custom_type": "business",
            "is_distinct": false,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "sdk": "Android",   // iOS, Android, JavaScript, .NET or API
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:message_read

    This webhook event is invoked when a user has no more unread messages in a group channel. The following shows a webhook payload of a group_channel:message_read event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    {
        "category": "group_channel:message_read",
        "members": [    // Provide only the member who has read the message to minimize backward issues.
            {
                "user_id": "John",
                "nickname": "Sendbirdian",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_24_512px.png",
                "is_active": true,
                "is_online": false,
                "is_hidden": 0,
                "state": "joined",       // The value can be either `joined` or `invited`.
                "unread_message_count": 0,
                "total_unread_message_count": 3,
                "channel_unread_message_count": 0,
                "channel_mention_count": 0,
                "push_enabled": false,
                "push_trigger_option": "default",
                "do_not_disturb": false,
                "metadata": {}
            }
        ],
        "channel": {
            "name": "Let's make a good company",
            "channel_url": "sendbird_group_channel_6037267_600ddc81a5e23049c804193370d47217fa2ed5f9",
            "custom_type": "business",
            "is_distinct": false,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "read_updates": [
            {
                "user_id": "John",
                "read_ts": 1540864257418,
                "channel_unread_message_count": 0,
                "total_unread_message_count": 3
            }
        ],
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:message_update

    This webhook event is invoked when a message is updated in a group channel. The following shows a webhook payload of a group_channel:message_update event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    TextFileAdmin
    {
        "category": "group_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": "I have a suggestion for our team.",
                "new": "I need some time to think about our team."
            }
        ],
        "members": [
            {
                "user_id": "Jeff",
                "nickname": "Oldies but goodies",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_38_512px.png",
                "is_active": true,
                "is_online": false,
                "is_hidden": 0,
                "state": "joined",  # joined or invited
                "is_blocking_sender": false,
                "is_blocked_by_sender": false,
                "unread_message_count": 16,
                "total_unread_message_count": 16,
                "channel_unread_message_count": 5,
                "channel_mention_count": 0,
                "push_enabled": false,
                "push_trigger_option": "default",
                "do_not_disturb": false,
                "metadata": {}
            },
            ... # More members
        ],
        "custom_type": "",
        "mention_type": "users",
        "mentioned_users": [],
        "type": "MESG",  # Text message
        "payload": {
            "message_id": 238303376,
            "custom_type": "",
            "message": "I need some time to think about our team.",
            "translations": {
                "en": "",
                "de": "",
                ...
            },
            "created_at": 1484205447940,
            "data": ""
        },
        "channel": {
            "name": "Sendbird engineers talking room",
            "channel_url": "sendbird_group_channel_47226288_21c0d617e45a7db4e12a7f5efdb4df4743b11c16",
            "custom_type": "business",
            "is_distinct": false,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "sdk": "Android",    # iOS, Android, JavaScript, .NET or API
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:message_delete

    This webhook event is invoked when a message is deleted from a group channel. The following shows a webhook payload of a group_channel:message_delete event.

    Note: By default, the members property is excluded from the payload. To include members, turn on the Include member information option under Settings > Chat > Webhooks on Sendbird Dashboard. Regardless of this option, webhook payloads of Supergroup channels don't include member information.

    TextFileAdmin
    {
        "category": "group_channel:message_delete",
        "sender": {
            "user_id": "Jay",
            "nickname": "Mighty",
            "profile_url": "https://sendbird.com/main/img/profiles/profile_26_512px.png",
            "metadata": {}
        },
        "members": [
            {
                "user_id": "Jin",
                "nickname": "JinJin",
                "profile_url": "https://sendbird.com/main/img/profiles/profile_24_512px.png",
                "is_active": true,
                "is_online": false,
                "is_hidden": 0,
                "state": "joined",  # joined or invited
                "unread_message_count": 5,
                "total_unread_message_count": 5,
                "channel_unread_message_count": 5,
                "channel_mention_count": 0,
                "push_enabled": false,
                "push_trigger_option": "default",
                "do_not_disturb": false,
                "metadata": {}
            },
            ... # More members
        ],
        "custom_type": "",
        "type": "MESG",
        "channel": {
            "name": "Trip to Africa",
            "channel_url": "sendbird_group_channel_6037267_600ddc81a5e23049c804193370d47217fa2ed5f9",
            "custom_type": "",
            "is_distinct": false,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_discoverable": false,
            "data": ""
        },
        "payload": {
            "message_id": 238303376,
            "custom_type": "",
            "message": "Hi, this text message will be deleted.",
            "translations": {},
            "data": "",
            "created_at": 0
        },
        "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
    

    group_channel:freeze_unfreeze

    This webhook event is invoked when a channel operator freezes or unfreezes a group channel. Default value for freeze is false. The following shows a webhook payload of a group_channel:freeze_unfreeze event.

    FreezeUnfreeze
    {
      "category": "group_channel:freeze_unfreeze",
      "app_id": "12801EAB-3BD0-439F-82F6-101F7BB0A6C1",
      "members": [
        {
          "unread_message_count": 0,
          "user_id": "2fa13190265a4ba99973b929aaa8fdfe",
          "channel_unread_message_count": 0,
          "total_unread_message_count": 0,
          "is_active": true,
          "push_enabled": true,
          "state": "joined",
          "is_online": false,
          "push_trigger_option": "default",
          "is_hidden": 0,
          "channel_mention_count": 0,
          "nickname": "",
          "profile_url": "",
          "metadata": {}
        },
        {
          "unread_message_count": 0,
          "user_id": "25d3279f0b2843528194c102f2557b21",
          "channel_unread_message_count": 0,
          "total_unread_message_count": 0,
          "is_active": true,
          "push_enabled": true,
          "state": "joined",
          "is_online": false,
          "push_trigger_option": "default",
          "is_hidden": 0,
          "channel_mention_count": 0,
          "nickname": "",
          "profile_url": "",
          "metadata": {}
        }
      ],
      "channel": {
        "is_distinct": false,
        "name": "Group Channel",
        "custom_type": "",
        "is_ephemeral": false,
        "channel_url": "sendbird_group_channel_16_b7039b3d922b2c968e5c2998e32e00a29ae5e0b5",
        "is_public": false,
        "freeze": true,
        "is_discoverable": false,
        "is_super": false,
        "data": ""
      }
    }
    

    group_channel:reaction_add

    This webhook event is invoked when a user adds reactions to a message. The following shows a webhook payload of a group_channel:reaction_add event.

    {
      "category": "group_channel:reaction_add",
      "reaction": "smile",
      "app_id": "693CFAA7-8A13-4CC5-8388-12C8008E8B48",
      "ts": 1644534894365,
      "user": {
        "user_id": "59b0fe57f40646549f5766401aa2752f",
        "nickname": "",
        "profile_url": ""
      },
      "message": {
        "sender_id": "59b0fe57f40646549f5766401aa2752f",
        "message_id": 1
      },
      "channel": {
        "is_distinct": false,
        "name": "Group Channel",
        "custom_type": "",
        "is_ephemeral": false,
        "channel_url": "sendbird_group_channel_9_3207f2165897efd6a4253305bb61bc1b9f8b0399",
        "is_public": false,
        "is_discoverable": false,
        "is_super": false,
        "data": ""
      }
    }
    

    group_channel:reaction_delete

    This webhook event is invoked when a user deletes reactions from a message. The following shows a webhook payload of a group_channel:reaction_delete event.

    {
      "category": "group_channel:reaction_delete",
      "reaction": "smile",
      "app_id": "693CFAA7-8A13-4CC5-8388-12C8008E8B48",
      "ts": 1644534899710,
      "user": {
        "user_id": "59b0fe57f40646549f5766401aa2752f",
        "nickname": "",
        "profile_url": ""
      },
      "message": {
        "sender_id": "59b0fe57f40646549f5766401aa2752f",
        "message_id": 1
      },
      "channel": {
        "is_distinct": false,
        "name": "Group Channel",
        "custom_type": "",
        "is_ephemeral": false,
        "channel_url": "sendbird_group_channel_9_3207f2165897efd6a4253305bb61bc1b9f8b0399",
        "is_public": false,
        "is_discoverable": false,
        "is_super": false,
        "data": ""
      }
    }