- The Webhook API documentation provides comprehensive guidance on how to integrate and utilize Webhook functionality for real-time event-driven communication.
- Our platform is designed around the concept of event-driven communication. It allows your applications to subscribe to specific events and receive instant notifications when these events occur.
Please review the following requirements for setting up your webhook endpoint:
- Your webhook endpoint must be accessible over HTTPS. This is essential to ensure the security and integrity of data transmission.
- Provide us with the URL where you'd like to receive webhook payloads. Webhook payloads would be in JSON format. This URL should be publicly accessible from the internet.
- Ensure that your endpoint supports the HTTP POST method. Webhook payloads will be delivered via HTTP POST requests.
- Configure your endpoint to respond immediately to the CometChat server with a 200 OK response.
- We recommend you use Basic Auth while configuring webhook, so as to validate incoming webhook requests.
Here is the list of properties associated with Webhook.
Parameters | Type | Description |
---|---|---|
id | string | Unique identifier of the webhook. It can have a maximum of 50 characters. |
name | string | Display name of the webhook. It can have a maximum of 50 characters. |
webhookURL | string | The webhookURL field represents the target URL to which webhook events will be delivered. |
useBasicAuth | boolean | The useBasicAuth field is a boolean flag that indicates whether basic authentication should be applied when sending webhook requests to the specified webhookURL |
username | string | This field should contain the username or identifier associated with the authentication credentials. |
password | string | This field should contain the secret password that corresponds to the provided username. |
enabled | boolean | The enabled field is a boolean flag that determines whether a webhook is currently active and capable of receiving and processing incoming events |
The following table lists the most common error codes that the Webhooks API may return in case of an error.
Code | Description |
---|---|
ERR_WEBHOOK_NOT_FOUND | Indicates the webhook does not exist. |
ERR_BAD_REQUEST | Indicates a validation error. |
AUTH_ERR_EMPTY_AUTH_HEADER | Indicates the authentication header is missing |
The list of triggers that are supported:
Note: The below mentioned list of triggers are in Beta.
triggerId | Description |
---|---|
message_sent | The hook triggers after the message is sent. |
message_edited | The hook triggers after the message is edited. |
message_deleted | The hook triggers after the message is deleted. |
message_reaction_added | The hook triggers after reaction is added to a message. |
message_reaction_removed | The hook triggers after reaction is removed from a message. |
user_blocked | The hook triggers when a user blocks another user. |
user_unblocked | The hook triggers when a user unblocks another user. |
group_created | The hook triggers after the group is created. |
group_updated | The hook triggers after the group is updated. |
group_deleted | The hook triggers after the group is deleted. |
group_member_joined | The hook triggers after a user joins a group. |
group_member_left | The hook triggers after a user leaves the group. |
group_member_added | The hook triggers after members are added to a group. |
group_member_kicked | The hook triggers after members are kicked from a group. |
group_member_banned | The hook triggers after members are banned from a group. |
group_member_unbanned | The hook triggers after members are unbanned from a group. |
group_member_scope_changed | The hook triggers if the scope of a member changes in a group. |
group_owner_transferred | The hook triggers if the owner of the group is changed. |
user_connection_status_changed | The hook triggers after a user connects/disconnects from the websocket server. |
message_delivery_receipt | The hook triggers when the client chat application confirms with Cometchat servers that a message was delivered. |
message_read_receipt | The hook triggers when the client chat application confirms with Cometchat servers that a message was read. |
call_initiated | The hook triggers when the call is initiated. |
call_started | The hook triggers when the call is started. |
call_participant_joined | The hook triggers when a participant joins the call. |
call_participant_left | The hook triggers when a participant leaves the call. |
call_ended | The hook triggers when the call is ended. |
meeting_started | The hook triggers when a meeting is started. |
meeting_participant_joined | The hook triggers when a participant joins the meeting. |
meeting_participant_left | The hook triggers when a participant leaves the meeting. |
meeting_ended | The hook triggers when the meeting is ended. |
recording_generated | The hook triggers when the recording is generated. |
triggerId -> Description
------------------------------------------------------------------------------------------------------------------------------------------------
message_sent -> The hook triggers after the message is sent.
message_edited -> The hook triggers after the message is edited.
message_deleted -> The hook triggers after the message is deleted.
message_reaction_added -> The hook triggers after reaction is added to a message.
message_reaction_removed -> The hook triggers after reaction is removed from a message.
user_blocked -> The hook triggers when a user blocks another user.
user_unblocked -> The hook triggers when a user unblocks another user.
group_created -> The hook triggers after the group is created.
group_updated -> The hook triggers after the group is updated.
group_deleted -> The hook triggers after the group is deleted.
group_member_joined -> The hook triggers after a user joins a group.
group_member_left -> The hook triggers after a user leaves the group.
group_member_added -> The hook triggers after members are added to a group.
group_member_kicked -> The hook triggers after members are kicked from a group.
group_member_banned -> The hook triggers after members are banned from a group.
group_member_unbanned -> The hook triggers after members are unbanned from a group.
group_member_scope_changed -> The hook triggers if the scope of a member changes in a group.
group_owner_transferred -> The hook triggers if the owner of the group is changed.
user_connection_status_changed -> The hook triggers after a user connects/disconnects from the websocket server.
message_delivery_receipt -> The hook triggers when the client chat application confirms with Cometchat servers that a message was delivered.
message_read_receipt -> The hook triggers when the client chat application confirms with Cometchat servers that a message was read.
call_initiated -> The hook triggers when the call is initiated.
call_started -> The hook triggers when the call is started.
call_participant_joined -> The hook triggers when a participant joins the call.
call_participant_left -> The hook triggers when a participant leaves the call.
call_ended -> The hook triggers when the call is ended.
meeting_started -> The hook triggers when a meeting is started.
meeting_participant_joined -> The hook triggers when a participant joins the meeting.
meeting_participant_left -> The hook triggers when a participant leaves the meeting.
meeting_ended -> The hook triggers when the meeting is ended.
recording_generated -> The hook triggers when the recording is generated.
Payload structure of events:
Groups:
{
"trigger":"group_created",
"data":{
"group":{
"guid":"supergroup",
"name":"Comic Hero Group",
"type":"public",
"scope":"admin",
"membersCount":1,
"joinedAt":1696932915,
"conversationId":"group_supergroup",
"hasJoined":true,
"createdAt":1696932915,
"owner":"superhero1"
},
"members":{
"superhero1":{
"uid":"superhero1",
"name":"Iron Man",
"status":"available",
"role":"default",
"lastActiveAt":1696932834
}
}
},
"appId":"<appId>",
"region":"<region>",
"webhook":"<webhookID>"
}
{
"trigger": "group_updated",
"data": {
"group": {
"guid": "supergroup",
"name": "Comic Hero Group",
"type": "public",
"membersCount": 2,
"conversationId": "group_supergroup",
"createdAt": 1695728507,
"owner": "superhero2",
"updatedAt": 1696934048,
"updatedBy": "superhero1",
"onlineMembersCount": 2
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "group_deleted",
"data": {
"group": {
"guid": "supergroup",
"name": "1234",
"type": "public",
"membersCount": 1,
"conversationId": "group_supergroup",
"createdAt": 1695722912,
"owner": "superhero1",
"updatedAt": 1695817083,
"updatedBy": "superhero1",
"onlineMembersCount": 1
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "group_owner_transferred",
"data": {
"group": {
"guid": "supergroup",
"name": "Comic Hero Group",
"type": "public",
"membersCount": 2,
"conversationId": "group_supergroup",
"createdAt": 1695728507,
"owner": "superhero2",
"updatedAt": 1696933737,
"updatedBy": "superhero1",
"onlineMembersCount": 2,
"oldOwner": "superhero1"
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "group_member_added",
"data": {
"group": {
"guid": "supergroup",
"name": "Comic Hero Group",
"type": "public",
"membersCount": 2,
"conversationId": "group_supergroup",
"createdAt": 1696932915,
"owner": "superhero1",
"onlineMembersCount": 1
},
"members": {
"superhero2": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "offline",
"role": "default",
"lastActiveAt": 1695751453,
"conversationId": "superhero1_user_superhero2"
}
},
"by": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696932834
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "group_member_banned",
"data": {
"group": {
"guid": "supergroup",
"name": "Comic Hero Group",
"type": "public",
"membersCount": 1,
"conversationId": "group_group__1696932914913",
"createdAt": 1696932915,
"owner": "superhero1",
"updatedAt": 1696933533,
"onlineMembersCount": 1
},
"members": {
"superhero2": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "offline",
"role": "default",
"lastActiveAt": 1695751453,
"conversationId": "superhero1_user_superhero2"
}
},
"by": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696932834
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "group_member_unbanned",
"data": {
"members": {
"superhero2": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "offline",
"role": "default",
"lastActiveAt": 1695751453,
"conversationId": "superhero1_user_superhero2"
}
},
"group": {
"guid": "supergroup",
"name": "Comic Hero Group",
"type": "public",
"membersCount": 1,
"conversationId": "group_supergroup",
"createdAt": 1696932915,
"owner": "superhero1",
"updatedAt": 1696933533,
"onlineMembersCount": 1
},
"by": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696932834
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "group_member_joined",
"data": {
"members": {
"superhero2": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696933689
}
},
"group": {
"guid": "supergroup",
"name": "Comic Hero Group",
"type": "public",
"membersCount": 2,
"conversationId": "group_supergroup",
"createdAt": 1695728507,
"owner": "superhero1",
"updatedAt": 1696933691,
"onlineMembersCount": 1
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "group_member_left",
"data": {
"members": {
"superhero2": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696933689
}
},
"group": {
"guid": "supergroup",
"name": "Comic Hero Group",
"type": "public",
"membersCount": 1,
"conversationId": "group_supergroup",
"createdAt": 1695722891,
"owner": "superhero1",
"updatedAt": 1696933827,
"onlineMembersCount": 1
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "group_member_scope_changed",
"data": {
"members": {
"superhero2": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696933928,
"conversationId": "superhero1_user_superhero2",
"scope": "admin",
"oldScope": "participant"
}
},
"group": {
"guid": "supergroup",
"name": "Comic Hero Group",
"type": "public",
"membersCount": 2,
"conversationId": "group_supergroup",
"createdAt": 1695722891,
"owner": "superhero1",
"updatedAt": 1696933925,
"onlineMembersCount": 2
},
"by": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696933934
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "group_member_kicked",
"data": {
"members": {
"superhero2": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696933689,
"conversationId": "superhero1_user_superhero2"
}
},
"group": {
"guid": "supergroup",
"name": "Comic Hero Group",
"type": "public",
"membersCount": 1,
"conversationId": "group_supergroup",
"createdAt": 1695722891,
"owner": "superhero1",
"updatedAt": 1696933889,
"onlineMembersCount": 8
},
"by": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696933881
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
Messages:
{
"trigger": "message_sent",
"data": {
"message": {
"id": "1",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "message",
"type": "text",
"data": {
"text": "hi",
"entities": {
"sender": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696934440
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696934491,
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
}
}
},
"sentAt": 1696934912,
"updatedAt": 1696934912
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "message_edited",
"data": {
"message": {
"id": "2",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "action",
"type": "message",
"data": {
"action": "edited",
"entities": {
"by": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696934440
},
"entityType": "user"
},
"for": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696934491,
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
},
"on": {
"entity": {
"id": "1",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "message",
"type": "text",
"data": {
"text": "hello",
"entities": {
"sender": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"role": "default",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"lastActiveAt": 1696934440
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"role": "default",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"lastActiveAt": 1696934491,
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
}
}
},
"sentAt": 1696934912,
"editedAt": 1696934985,
"editedBy": "superhero1",
"deliveredAt": 1696934912,
"readAt": 1696934950,
"updatedAt": 1696934985
},
"entityType": "message"
}
},
},
"sentAt": 1696934985,
"updatedAt": 1696934985
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "message_deleted",
"data": {
"message": {
"id": "3",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "action",
"type": "message",
"data": {
"action": "deleted",
"entities": {
"by": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696934440
},
"entityType": "user"
},
"for": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696934491,
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
},
"on": {
"entity": {
"id": "2",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "message",
"type": "text",
"data": {
"entities": {
"sender": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"role": "default",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"lastActiveAt": 1696934440
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"role": "default",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"lastActiveAt": 1696934491,
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
}
}
},
"sentAt": 1696934912,
"deliveredAt": 1696934912,
"readAt": 1696934950,
"deletedAt": 1696935005,
"updatedAt": 1696935005,
"deletedBy": "superhero1"
},
"entityType": "message"
}
},
},
"sentAt": 1696935005,
"updatedAt": 1696935005
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "message_delivery_receipt",
"data": {
"receiver": "superhero1",
"receiverType": "user",
"type": "receipts",
"sender": "superhero2",
"messageSender": "superhero1",
"body": {
"action": "delivered",
"messageId": "57",
"user": {
"hasBlockedMe": false,
"blockedByMe": false,
"deactivatedAt": 0,
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"lastActiveAt": 1696934489,
"role": "default",
"status": "online"
},
"timestamp": 1696934912
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "message_read_receipt",
"data": {
"receiver": "superhero1",
"receiverType": "user",
"type": "receipts",
"sender": "superhero2",
"messageSender": "superhero1",
"body": {
"action": "read",
"messageId": "57",
"user": {
"hasBlockedMe": false,
"blockedByMe": false,
"deactivatedAt": 0,
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"lastActiveAt": 1696934489,
"role": "default",
"status": "online"
},
"timestamp": 1696934950
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "message_reaction_removed",
"data": {
"reaction": {
"id": "<reactionId>",
"messageId": "<messageId>",
"reaction": "🏒",
"uid": "superhero1",
"reactedAt": 1700231289,
"reactedBy": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "offline",
"role": "default",
"lastActiveAt": 1700652818
}
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "message_reaction_added",
"data": {
"reaction": {
"id": "<reactionId>",
"messageId": "<messageId>",
"reaction": "🏒",
"uid": "superhero1",
"reactedAt": 1700655536,
"reactedBy": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "offline",
"role": "default",
"lastActiveAt": 1700652818
}
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
Users:
{
"trigger": "user_connection_status_changed",
"data": {
"timestamp": 1696935103114,
"user": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "offline",
"role": "default",
"lastActiveAt": 1693916686
},
"status": "offline",
"currentConnection": {
"action": "disconnected",
"appInfo": {
"version": "3.0.12",
"apiVersion": "v3.0",
"origin": "http://localhost:5173",
"uts": 1696934440846,
"clientIp": "3.128.113.92"
},
"platform": "javascript",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
"connectedAt": 1696934440982
},
"userPresenceChanged": true
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "user_blocked",
"data": {
"users": {
"superhero2": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696934491,
"conversationId": "superhero1_user_superhero2"
}
},
"by": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696935105
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "user_unblocked",
"data": {
"users": {
"superhero2": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/captainamerica.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696934491,
"conversationId": "superhero1_user_superhero2"
}
},
"by": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696935105
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "user_mentioned",
"data": {
"message": {
"id": "4",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "message",
"type": "text",
"data": {
"text": "Hi <@uid:superhero2>",
"entities": {
"sender": {
"entity": {
"uid": "superhero1",
"name": "Captain America",
"status": "offline",
"role": "default",
"createdAt": 1702025699
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero2",
"name": "IronMan",
"status": "available",
"role": "default",
"lastActiveAt": 1702028122,
"createdAt": 1701931840,
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
}
},
"mentions": {
"superhero2": {
"uid": "superhero2",
"name": "IronMan",
"status": "available",
"role": "default",
"lastActiveAt": 1702028122,
"createdAt": 1701931840,
"conversationId": "superhero1_user_superhero2"
}
}
},
"sentAt": 1702028666,
"updatedAt": 1702028666
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
Call & Meeting
{
"trigger": "call_initiated",
"data": {
"call": {
"id": "52",
"conversationId": "superhero1_user_superhero5",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero5",
"category": "call",
"type": "audio",
"data": {
"action": "initiated",
"entities": {
"by": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696933934
},
"entityType": "user"
},
"for": {
"entity": {
"uid": "superhero5",
"name": "Cyclops",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/cyclops.png",
"status": "offline",
"role": "default",
"conversationId": "superhero1_user_superhero5"
},
"entityType": "user"
},
"on": {
"entity": {
"sessionid": "<sessionId>",
"conversationId": "superhero1_user_superhero5",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero5",
"status": "initiated",
"type": "audio",
"data": {
"entities": {
"sender": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/ironman.png",
"status": "available",
"role": "default",
"lastActiveAt": 1696933934
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero5",
"name": "Cyclops",
"avatar": "https://data-us.cometchat-staging.com/assets/images/avatars/cyclops.png",
"status": "offline",
"role": "default",
"conversationId": "superhero1_user_superhero5"
},
"entityType": "user"
}
}
},
"initiatedAt": 1696934199,
"joinedAt": 1696934199
},
"entityType": "call"
}
},
"resource": "WEB-3_0_12-acfa8397-42f0-4f19-bc28-bc7db316ecaf-1696933879599"
},
"sentAt": 1696934199,
"updatedAt": 1696934199
}
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "call_started",
"data": {
"created_at": 1696934572,
"sessionId": "<sessionId>"
},
"type": "call",
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "call_ended",
"data": {
"all_occupants": [
{
"joined_at": 1696934501,
"audio_call": "true",
"left_at": 1696934553,
"name": "Captain America"
},
{
"joined_at": 1696934501,
"audio_call": "true",
"left_at": 1696934551,
"name": "Iron Man"
}
],
"destroyed_at": 1696934553,
"created_at": 1696934501,
"sessionId": "<sessionId>"
},
"type": "call",
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "call_participant_joined",
"data": {
"occupant": {
"joined_at": 1696934573,
"audio_call": "true",
"name": "Iron Man"
},
"initial_config": {
"is_video_muted": "false",
"start_recording_on_call_start": "false",
"call_version": "2.3.0",
"is_audio_muted": "false",
"sdk": "react",
"mode": "DEFAULT",
"platform": "web",
"is_audio_only": "true"
},
"sessionId": "<sessionId>"
},
"type": "call",
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "call_participant_left",
"data": {
"occupant": {
"joined_at": 1696934501,
"audio_call": "true",
"left_at": 1696934553,
"name": "Captain America"
},
"sessionId": "<sessionId>"
},
"type": "call",
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "meeting_started",
"data": {
"created_at": 1696934692,
"sessionId": "<sessionId>"
},
"type": "meet",
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "meeting_participant_joined",
"data": {
"occupant": {
"joined_at": 1696934692,
"audio_call": "false",
"name": "Iron Man"
},
"initial_config": {
"is_video_muted": "false",
"start_recording_on_call_start": "false",
"call_version": "2.3.0",
"is_audio_muted": "false",
"sdk": "react",
"mode": "DEFAULT",
"platform": "web",
"is_audio_only": "false"
},
"sessionId": "<sessionId>"
},
"type": "meet",
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "meeting_participant_left",
"data": {
"occupant": {
"joined_at": 1696934692,
"audio_call": "false",
"left_at": 1696934730,
"name": "Iron Man"
},
"sessionId": "<sessionId>"
},
"type": "meet",
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "meeting_ended",
"data": {
"all_occupants": [
{
"joined_at": 1696934692,
"audio_call": "false",
"left_at": 1696934730,
"name": "Iron Man"
}
],
"destroyed_at": 1696934730,
"created_at": 1696934692,
"sessionId": "<sessionId>"
},
"type": "meet",
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
{
"trigger": "recording_generated",
"data": {
"recordingDate": "2023-10-10",
"duration": "21.433000",
"startTime": "1696937627",
"sessionId": "<sessionId>",
"recording_url": "<recording_url>"
},
"appId": "<appId>",
"region": "<region>",
"webhook": "<webhookID>"
}
Properties and Constraints:
Item | Property or Constraint | Notes |
---|---|---|
Maximum number of webhooks in an app | Maximum 25 | |
Webhook URL | Valid URL, maximum 255 characters | |
Webhook ID | 50 characters, UTF8mb4 set, alphanumeric (without spaces) | |
Webhook authentication username | 50 characters, alphanumeric (without spaces) | |
Webhook authentication password | 100 characters, alphanumeric (without spaces) |