Events

Last Edit: Nov 27 2020

Below you can find the complete list of events that are sent via webhooks together with the description of the data payload.

For message and channel events the webhook request body will also include the list of channel members and attach additional information about their read status. For performance reasons, such list is only included for channels with up to 50 members.

When applicable, the following attributes are included to the event user and to the event members:

total_unread_count the total count of messages across all channels.
unread_channels the count of channels with at least one unread message.
channel_last_read_at the last time the channel was marked as read.
channel_unread_count the count of unread messages on this channel

Webhook Event Types

Event TRiggered
message.new when a new message is added.
message.read when a user calls mark as read.
message.updated when a message is updated.
message.deleted when a message is deleted.
message.flagged when a message is flagged.
message.unflagged when a message is unflagged.
reaction.new when a message reaction is added.
reaction.deleted when a message reaction deleted
member.added when a member is added to a channel.
member.updated when a member is updated.
member.removed when a member is removed from a channel.
channel.updated when a channel is updated.
channel.deleted when a channel is deleted.
user.deactivated when a user is deactivated
user.deleted when a user is deleted
user.reactivated when a user is reactivated
user.updated when a user is updated.
user.muted when a user is muted.
user.unmuted when a user is unmuted.
channel.truncated when a channel is truncated.

message.new


{
   "type":"message.new",
   "cid":"messaging:fun-d5f396e3-fbaf-469c-9b45-8837b4f75baa",
   "message":{
      "id":"8bffc454-e1da-4d91-8b88-a87853dfb41c",
      "text":"67d61fa4-74b6-4e1a-bfe7-589d84b8215b",
      "html":"<p>67d61fa4-74b6-4e1a-bfe7-589d84b8215b</p>\n",
      "type":"regular",
      "user":{
         "id":"tommaso-52ec3a5f-e916-469f-bf54-b53b5247a4b0",
         "role":"user",
         "created_at":"2020-03-30T07:54:46.207332Z",
         "updated_at":"2020-03-30T07:54:46.207719Z",
         "banned":false,
         "online":false
      },
      "attachments":[

      ],
      "latest_reactions":[

      ],
      "own_reactions":[

      ],
      "reaction_counts":null,
      "reaction_scores":{

      },
      "reply_count":0,
      "created_at":"2020-03-30T07:54:46.277381Z",
      "updated_at":"2020-03-30T07:54:46.277382Z",
      "mentioned_users":[

      ]
   },
   "user":{
      "id":"tommaso-52ec3a5f-e916-469f-bf54-b53b5247a4b0",
      "role":"user",
      "created_at":"2020-03-30T07:54:46.207332Z",
      "updated_at":"2020-03-30T07:54:46.207719Z",
      "banned":false,
      "online":false,
      "channel_unread_count":0,
      "channel_last_read_at":"2020-03-30T07:54:46.270208768Z",
      "total_unread_count":0,
      "unread_channels":0,
      "unread_count":0
   },
   "created_at":"2020-03-30T07:54:46.295138Z",
   "members":[
      {
         "user_id":"thierry-735d0d44-8bf1-40df-81db-fa83363ac790",
         "user":[
            "Object"
         ],
         "created_at":"2020-03-30T07:54:46.255628Z",
         "updated_at":"2020-03-30T07:54:46.255628Z"
      },
      {
         "user_id":"tommaso-52ec3a5f-e916-469f-bf54-b53b5247a4b0",
         "user":[
            "Object"
         ],
         "created_at":"2020-03-30T07:54:46.256118Z",
         "updated_at":"2020-03-30T07:54:46.256118Z"
      }
   ],
   "channel_type":"messaging",
   "channel_id":"fun-d5f396e3-fbaf-469c-9b45-8837b4f75baa"
}
                    

message.read


{
  "cid": "messaging:fun",
  "type": "message.read",
  "user": {
    "id": "a6e21b36-798b-408a-9cd1-0cf6c372fc7f",
    "role": "user",
    "created_at": "2019-04-24T08:49:58.170034Z",
    "updated_at": "2019-04-24T08:49:59.345304Z",
    "last_active": "2019-04-24T08:49:59.344201Z",
    "online": true,
    "total_unread_count": 0,
    "unread_channels": 0,
    "unread_count": 0,
    "channel_unread_count": 0,
    "channel_last_read_at": "2019-04-24T08:49:59.365498Z"
  },
  "created_at": "2019-04-24T08:49:59.365489Z"
}
                    

message.updated


{
  "cid": "messaging:fun",
  "type": "message.updated",
  "message": {
    "id": "93163f53-4174-4be8-90cd-e59bef78da00",
    "text": "new stuff",
    "html": "<p>new stuff</p>\n",
    "type": "regular",
    "user": {
      "id": "75af03a7-fe83-4a2a-a447-9ed4fac2ea36",
      "role": "user",
      "created_at": "2019-04-24T08:51:26.846395Z",
      "updated_at": "2019-04-24T08:51:27.973941Z",
      "last_active": "2019-04-24T08:51:27.972713Z",
      "online": false
    },
    "attachments": [],
    "latest_reactions": [],
    "own_reactions": [],
    "reaction_counts": null,
    "reply_count": 0,
    "created_at": "2019-04-24T08:51:28.005691Z",
    "updated_at": "2019-04-24T08:51:28.138422Z",
    "mentioned_users": []
  },
  "user": {
    "id": "75af03a7-fe83-4a2a-a447-9ed4fac2ea36",
    "role": "user",
    "created_at": "2019-04-24T08:51:26.846395Z",
    "updated_at": "2019-04-24T08:51:27.973941Z",
    "last_active": "2019-04-24T08:51:27.972713Z",
    "online": true,
    "channel_unread_count": 1,
    "channel_last_read_at": "2019-04-24T08:51:27.994245Z",
    "total_unread_count": 2,
    "unread_channels": 2,
    "unread_count": 2
  },
  "created_at": "2019-04-24T10:51:28.142291+02:00"
}
                    

message.deleted


{
  "cid": "messaging:fun",
  "type": "message.deleted",
  "message": {
    "id": "268d121f-82e0-4de1-8c8b-ef1201efd7a3",
    "text": "new stuff",
    "html": "<p>new stuff</p>\n",
    "type": "regular",
    "user": {
      "id": "76cd8430-2f91-4059-90e5-02dffb910297",
      "role": "user",
      "created_at": "2019-04-24T09:44:21.390868Z",
      "updated_at": "2019-04-24T09:44:22.537305Z",
      "last_active": "2019-04-24T09:44:22.535872Z",
      "online": false
    },
    "attachments": [],
    "latest_reactions": [],
    "own_reactions": [],
    "reaction_counts": {},
    "reply_count": 0,
    "created_at": "2019-04-24T09:44:22.57073Z",
    "updated_at": "2019-04-24T09:44:22.717078Z",
    "deleted_at": "2019-04-24T09:44:22.730524Z",
    "mentioned_users": []
  },
  "created_at": "2019-04-24T09:44:22.733305Z"
}
                    

message.flagged


{
  "type": "message.flagged",
  "cid": "messaging:fun-0fd5eb0b-9f5f-4b72-b697-75c94db4d08c",
  "message": {
    "id": "b7a435ad-79eb-4c60-bb3e-9f85ff00b8ce",
    "text": "hello world",
    "html": "<p>hello world</p>\n",
    "type": "regular",
    "user": {
      "id": "jaap-4e6f9e79-dfed-4253-bb9e-e909c2618a0f",
      "role": "user",
      "created_at": "2020-06-02T10:43:35.690334Z",
      "updated_at": "2020-06-02T10:43:35.823399Z",
      "last_active": "2020-06-02T10:43:35.818956Z",
      "banned": false,
      "online": false
    },
    "attachments": [],
    "latest_reactions": [],
    "own_reactions": [],
    "reaction_counts": null,
    "reaction_scores": {},
    "reply_count": 0,
    "created_at": "2020-06-02T10:43:35.828084Z",
    "updated_at": "2020-06-02T10:43:35.828085Z",
    "mentioned_users": [],
    "silent": false
  },
  "user": {
    "id": "thierry-a77f9983-7d92-44f3-86c1-de96be8633b3",
    "role": "user",
    "created_at": "2020-06-02T10:43:35.657159Z",
    "updated_at": "2020-06-02T10:43:35.658598Z",
    "banned": false,
    "online": false
  },
  "created_at": "2020-06-02T10:43:35.859537Z",
  "members": [],
  "channel_type": "messaging",
  "channel_id": "fun-0fd5eb0b-9f5f-4b72-b697-75c94db4d08c"
}
                    

message.flagged - automoderation


{
  "type": "message.flagged",
  "message": {
    "id": "e83c64ac-cc60-4097-83ea-30d2fb7506a1",
    "text": "hello world",
    "html": "",
    "type": "",
    "user": null,
    "attachments": null,
    "latest_reactions": null,
    "own_reactions": null,
    "reaction_counts": null,
    "reaction_scores": null,
    "reply_count": 0,
    "created_at": "0001-01-01T00:00:00Z",
    "updated_at": "0001-01-01T00:00:00Z",
    "deleted_at": "0001-01-01T00:00:00Z",
    "Custom": null,
    "mentioned_users": null,
    "silent": false
  },
  "channel": {
    "id": "",
    "type": "",
    "cid": "messaging:fun-b035460d-b272-4623-a08a-663f296c0732",
    "last_message_at": "0001-01-01T00:00:00Z",
    "created_at": "0001-01-01T00:00:00Z",
    "updated_at": "0001-01-01T00:00:00Z",
    "created_by": null,
    "frozen": false,
    "config": null,
    "hide_messages_before": "0001-01-01T00:00:00Z",
    "Custom": null
  },
  "automoderation": true,
  "automoderation_scores": {
    "toxic": 0,
    "severe_toxic": 0,
    "obscene": 0,
    "threat": 0,
    "insult": 0,
    "identity_hate": 20,
    "fine": 0,
    "spam": 15,
    "ham": 0
  },
  "Custom": null,
  "created_at": "2020-06-23T11:50:32.313081Z"
}
                    

message.unflagged


{
  "type": "message.unflagged",
  "cid": "messaging:fun-28e93344-5d6b-4110-8621-b28856c99d58",
  "message": {
    "id": "f8c02541-7b39-442c-ade3-207ff85625b8",
    "text": "hello world",
    "html": "<p>hello world</p>\n",
    "type": "regular",
    "user": {
      "id": "jaap-df7eff33-854c-4034-b005-2e79ede17f3f",
      "role": "user",
      "created_at": "2020-06-02T11:07:02.728629Z",
      "updated_at": "2020-06-02T11:07:02.797656Z",
      "last_active": "2020-06-02T11:07:02.796484Z",
      "banned": false,
      "online": false
    },
    "attachments": [],
    "latest_reactions": [],
    "own_reactions": [],
    "reaction_counts": null,
    "reaction_scores": {},
    "reply_count": 0,
    "created_at": "2020-06-02T11:07:02.799227Z",
    "updated_at": "2020-06-02T11:07:02.799228Z",
    "mentioned_users": [],
    "silent": false
  },
  "user": {
    "id": "thierry-b1d5df04-3ef5-46d9-a637-803e3449223a",
    "role": "user",
    "created_at": "2020-06-02T11:07:02.709105Z",
    "updated_at": "2020-06-02T11:07:02.709918Z",
    "banned": false,
    "online": false
  },
  "created_at": "2020-06-02T11:07:02.822371Z",
  "channel_id": "fun-28e93344-5d6b-4110-8621-b28856c99d58",
  "members": [],
  "channel_type": "messaging"
}
                    

reaction.new


{
  "cid": "messaging:fun",
  "type": "reaction.new",
  "message": {
    "id": "4b3c7b6c-a39d-4069-9450-2a3716cf4ca6",
    "text": "new stuff",
    "html": "<p>new stuff</p>\n",
    "type": "regular",
    "user": {
      "id": "57fabaed-446a-40b4-a6ec-e0ac8cad57e3",
      "role": "user",
      "created_at": "2019-04-24T09:49:47.158005Z",
      "updated_at": "2019-04-24T09:49:48.301933Z",
      "last_active": "2019-04-24T09:49:48.300566Z",
      "online": false
    },
    "attachments": [],
    "latest_reactions": [
      {
        "message_id": "4b3c7b6c-a39d-4069-9450-2a3716cf4ca6",
        "user": {
          "id": "57fabaed-446a-40b4-a6ec-e0ac8cad57e3",
          "role": "user",
          "created_at": "2019-04-24T09:49:47.158005Z",
          "updated_at": "2019-04-24T09:49:48.301933Z",
          "last_active": "2019-04-24T09:49:48.300566Z",
          "online": true
        },
        "type": "lol",
        "created_at": "2019-04-24T09:49:48.481994Z"
      }
    ],
    "own_reactions": [],
    "reaction_counts": {
      "lol": 1
    },
    "reply_count": 0,
    "created_at": "2019-04-24T09:49:48.334808Z",
    "updated_at": "2019-04-24T09:49:48.483028Z",
    "mentioned_users": []
  },
  "reaction": {
    "message_id": "4b3c7b6c-a39d-4069-9450-2a3716cf4ca6",
    "user": {
      "id": "57fabaed-446a-40b4-a6ec-e0ac8cad57e3",
      "role": "user",
      "created_at": "2019-04-24T09:49:47.158005Z",
      "updated_at": "2019-04-24T09:49:48.301933Z",
      "last_active": "2019-04-24T09:49:48.300566Z",
      "online": true
    },
    "type": "lol",
    "created_at": "2019-04-24T09:49:48.481994Z"
  },
  "user": {
    "id": "57fabaed-446a-40b4-a6ec-e0ac8cad57e3",
    "role": "user",
    "created_at": "2019-04-24T09:49:47.158005Z",
    "updated_at": "2019-04-24T09:49:48.301933Z",
    "last_active": "2019-04-24T09:49:48.300566Z",
    "online": true,
    "unread_channels": 2,
    "unread_count": 2,
    "channel_unread_count": 1,
    "channel_last_read_at": "2019-04-24T09:49:48.321138Z",
    "total_unread_count": 2
  },
  "created_at": "2019-04-24T09:49:48.488497Z"
}
                    

reaction.deleted


{
  "cid": "messaging:fun",
  "type": "reaction.deleted",
  "message": {
    "id": "4b3c7b6c-a39d-4069-9450-2a3716cf4ca6",
    "text": "new stuff",
    "html": "<p>new stuff</p>\n",
    "type": "regular",
    "user": {
      "id": "57fabaed-446a-40b4-a6ec-e0ac8cad57e3",
      "role": "user",
      "created_at": "2019-04-24T09:49:47.158005Z",
      "updated_at": "2019-04-24T09:49:48.301933Z",
      "last_active": "2019-04-24T09:49:48.300566Z",
      "online": false
    },
    "attachments": [],
    "latest_reactions": [],
    "own_reactions": [],
    "reaction_counts": {},
    "reply_count": 0,
    "created_at": "2019-04-24T09:49:48.334808Z",
    "updated_at": "2019-04-24T09:49:48.511631Z",
    "mentioned_users": []
  },
  "reaction": {
    "message_id": "4b3c7b6c-a39d-4069-9450-2a3716cf4ca6",
    "user": {
      "id": "57fabaed-446a-40b4-a6ec-e0ac8cad57e3",
      "role": "user",
      "created_at": "2019-04-24T09:49:47.158005Z",
      "updated_at": "2019-04-24T09:49:48.301933Z",
      "last_active": "2019-04-24T11:49:48.497656+02:00",
      "online": true
    },
    "type": "lol",
    "created_at": "2019-04-24T09:49:48.481994Z"
  },
  "user": {
    "id": "57fabaed-446a-40b4-a6ec-e0ac8cad57e3",
    "role": "user",
    "created_at": "2019-04-24T09:49:47.158005Z",
    "updated_at": "2019-04-24T09:49:48.301933Z",
    "last_active": "2019-04-24T11:49:48.497656+02:00",
    "online": true,
    "total_unread_count": 2,
    "unread_channels": 2,
    "unread_count": 2,
    "channel_unread_count": 1,
    "channel_last_read_at": "2019-04-24T09:49:48.321138Z"
  },
  "created_at": "2019-04-24T09:49:48.511082Z"
}
                    

member.added


{
  "cid": "messaging:fun",
  "type": "member.added",
  "member": {
    "user_id": "d4d7b21a-78d4-4148-9830-eb2d3b99c1ec",
    "user": {
      "id": "d4d7b21a-78d4-4148-9830-eb2d3b99c1ec",
      "role": "user",
      "created_at": "2019-04-24T09:49:47.149933Z",
      "updated_at": "2019-04-24T09:49:47.151159Z",
      "online": false
    },
    "created_at": "2019-04-24T09:49:48.534412Z",
    "updated_at": "2019-04-24T09:49:48.534412Z"
  },
  "user": {
    "id": "d4d7b21a-78d4-4148-9830-eb2d3b99c1ec",
    "role": "user",
    "created_at": "2019-04-24T09:49:47.149933Z",
    "updated_at": "2019-04-24T09:49:47.151159Z",
    "online": false,
    "channel_last_read_at": "2019-04-24T09:49:48.537084Z",
    "total_unread_count": 0,
    "unread_channels": 0,
    "unread_count": 0,
    "channel_unread_count": 0
  },
  "created_at": "2019-04-24T09:49:48.537082Z"
}
                    

member.updated


{
  "cid": "messaging:fun",
  "type": "member.updated",
  "member": {
    "user_id": "d4d7b21a-78d4-4148-9830-eb2d3b99c1ec",
    "user": {
      "id": "d4d7b21a-78d4-4148-9830-eb2d3b99c1ec",
      "role": "user",
      "created_at": "2019-04-24T09:49:47.149933Z",
      "updated_at": "2019-04-24T09:49:47.151159Z",
      "online": false
    },
    "is_moderator": true,
    "created_at": "2019-04-24T09:49:48.534412Z",
    "updated_at": "2019-04-24T09:49:48.547034Z"
  },
  "user": {
    "id": "d4d7b21a-78d4-4148-9830-eb2d3b99c1ec",
    "role": "user",
    "created_at": "2019-04-24T09:49:47.149933Z",
    "updated_at": "2019-04-24T09:49:47.151159Z",
    "online": false,
    "total_unread_count": 0,
    "unread_channels": 0,
    "unread_count": 0,
    "channel_unread_count": 0,
    "channel_last_read_at": "2019-04-24T09:49:48.549211Z"
  },
  "created_at": "2019-04-24T09:49:48.54921Z"
}
                    

member.removed


{
    "cid": "messaging:fun",
    "type": "member.removed",
    "user": {
        "id": "6585dbbb-3d46-4943-9b14-a645aca11df4",
        "role": "user",
        "created_at": "2019-03-22T14:22:04.581208Z",
        "online": false
    },
    "created_at": "2019-03-22T14:22:07.040496Z"
}
                    

channel.updated


{
    "cid": "messaging:fun",
    "type": "channel.updated",
    "channel": {
        "cid": "messaging:fun",
        "id": "fun",
        "type": "messaging",
        "last_message_at": "2019-04-24T09:49:48.576202Z",
        "created_by": {
            "id": "57fabaed-446a-40b4-a6ec-e0ac8cad57e3",
            "role": "user",
            "created_at": "2019-04-24T09:49:47.158005Z",
            "updated_at": "2019-04-24T09:49:48.301933Z",
            "last_active": "2019-04-24T09:49:48.497656Z",
            "online": true
        },
        "created_at": "2019-04-24T09:49:48.180908Z",
        "updated_at": "2019-04-24T09:49:48.180908Z",
        "frozen": false,
        "config": {
            "created_at": "2016-08-18T16:42:30.586808Z",
            "updated_at": "2016-08-18T16:42:30.586808Z",
            "name": "messaging",
            "typing_events": true,
            "read_events": true,
            "connect_events": true,
            "search": true,
            "reactions": true,
            "replies": true,
            "mutes": true,
            "message_retention": "infinite",
            "max_message_length": 5000,
            "automod": "disabled",
            "commands": [
                "giphy",
                "flag",
                "ban",
                "unban",
                "mute",
                "unmute"
            ]
        },
        "awesome": "yes"
    },
    "created_at": "2019-04-24T09:49:48.594316Z"
}
                    

channel.deleted


{
  "cid": "messaging:fun",
  "type": "channel.deleted",
  "channel": {
    "cid": "messaging:fun",
    "id": "fun",
    "type": "messaging",
    "created_at": "2019-04-24T09:49:48.180908Z",
    "updated_at": "2019-04-24T09:49:48.180908Z",
    "deleted_at": "2019-04-24T09:49:48.626704Z",
    "frozen": false,
    "config": {
      "created_at": "2016-08-18T18:42:30.586808+02:00",
      "updated_at": "2016-08-18T18:42:30.586808+02:00",
      "name": "messaging",
      "typing_events": true,
      "read_events": true,
      "connect_events": true,
      "search": true,
      "reactions": true,
      "replies": true,
      "mutes": true,
      "message_retention": "infinite",
      "max_message_length": 5000,
      "automod": "disabled",
      "commands": [
        "giphy",
        "flag",
        "ban",
        "unban",
        "mute",
        "unmute"
      ]
    }
  },
  "created_at": "2019-04-24T09:49:48.630913Z"
}
                    

user.banned


{
  "type": "user.banned",
  "user": {
    "id": "2a653a76-ae41-4608-8092-5ce9adf5e608",
    "role": "user",
    "created_at": "2020-06-24T14:01:56.934997Z",
    "updated_at": "2020-06-24T14:01:56.935431Z",
    "banned": false,
    "online": false
  },
  "reason": "testy mctestify",
  "created_by": {
    "id": "thierry-b29ed30e-ec8f-47df-872b-b94355a525c4",
    "role": "user",
    "created_at": "2020-06-24T14:01:56.184699Z",
    "updated_at": "2020-06-24T14:01:56.621791Z",
    "banned": false,
    "online": true,
    "awesome": true
  },
  "created_at": "2020-06-24T14:01:56.940165Z",
  "expiration": "2020-06-24T16:01:56.93919Z"
}
                    

user.deactivated


{
  "type": "user.deactivated",
  "user": {
    "id": "5f96e5dd-3998-4d0a-ae37-bd77cc67c2ce",
    "role": "user",
    "created_at": "2020-06-23T10:41:51.322897Z",
    "updated_at": "2020-06-23T10:41:51.323291Z",
    "banned": false,
    "online": false
  },
  "created_by_id": "thierry-24516a73-0bd9-4551-a86c-b60e8912cee0",
  "created_at": "2020-06-23T10:41:51.33211Z"
}
                    

user.deleted


{
  "type": "user.deleted",
  "user": {
    "id": "bfdf5075-fe36-4b84-9732-39c09843dfd8",
    "role": "user",
    "created_at": "2020-06-23T10:48:37.391206Z",
    "updated_at": "2020-06-23T10:48:37.39151Z",
    "deleted_at": "2020-06-23T10:48:37.394938Z",
    "banned": false,
    "online": false
  },
  "created_at": "2020-06-23T10:48:37.396179Z"
}
                    

user.reactivated


{
  "type": "user.reactivated",
  "user": {
    "id": "dad409c6-424c-4534-9d40-06620dbe47d8",
    "role": "user",
    "created_at": "2020-06-23T10:49:37.632951Z",
    "updated_at": "2020-06-23T10:49:37.633248Z",
    "banned": false,
    "online": false
  },
  "created_by": {
    "id": "thierry-edb850ba-9dc2-4299-91f9-73e7066daff2",
    "role": "user",
    "created_at": "2020-06-23T10:49:36.952668Z",
    "updated_at": "2020-06-23T10:49:37.337261Z",
    "last_active": "2020-06-23T10:49:37.170582Z",
    "banned": false,
    "online": true,
    "awesome": true
  },
  "created_at": "2020-06-23T10:49:37.646512Z"
}
                    

user.unbanned


{
  "type": "user.unbanned",
  "user": {
    "id": "2b5b5d4b-f867-46ed-b9ef-7dfb64f5dae2",
    "role": "user",
    "created_at": "2020-06-23T10:55:01.361163Z",
    "updated_at": "2020-06-23T10:55:01.361762Z",
    "banned": true,
    "online": false
  },
  "created_at": "2020-06-23T10:55:01.373079Z"
}
                    

user.updated


{
  "type": "user.updated",
  "user": {
    "id": "thierry-7b690297-98fa-42dd-b999-a75dd4c7c993",
    "role": "user",
    "online": false,
    "awesome": true
  },
  "created_at": "2019-04-24T12:54:58.956621Z",
  "members": []
}