Overview

Welcome to the CometChat's Multi-Tenancy API documentation!
This comprehensive guide offers in-depth insights into the Multi-tenancy APIs provided by CometChat. Access to Multi-tenancy APIs is exclusive to clients with plans that support this feature. To verify feature availability in your plan, please refer to our pricing page: https://www.cometchat.com/pricing.

Introduction

The Multi-Tenancy API provided by CometChat empowers users to execute a wide array of operations at the application level.
This functionality enables developers to oversee their CometChat applications at the account level through REST APIs, eliminating the need to repeatedly access the dashboard for managing operations related to their multi-tenant apps. This approach offers enhanced control and flexibility in resource management.

Getting Started

To initiate usage of CometChat's Multi-Tenancy API, it's necessary to reach out to the Sales team to activate it. Once activated, the Sales team will provide you with a key & secret enabling access to the Multi-Tenancy APIs.

Authentication

All API requests must be accompanied by a key & secret to authenticate the APIs.

Endpoints

CometChat's REST API offers a variety of endpoints catering to different aspects of multi-tenant functionality, including app management, extensions management, team management, and more. These endpoints are designed to be intuitive and easy to integrate into your application's backend infrastructure.

Example of a Create App API request in curl command syntax:

curl -X POST \
-H "Content-Type: application/json" \
-H "key: YOUR_KEY" \
-H "secret: YOUR_SECRET" \
-d '{
    "name": "Test app",
    "version": "3",
    "region": "us"
}' "https://apimgmt.cometchat.io/apps"

key and secret need to be replaced in the curl request.

Sample Code

To further assist you in integrating CometChat's REST API into your application, we provide sample code snippets in popular programming languages such as JavaScript, Python, NodeJS, and PHP. These snippets demonstrate how to make API requests and handle responses, helping you kickstart your development process.


Support

If you encounter any issues or have questions regarding CometChat's REST API, our dedicated support team is here to assist you. Feel free to create a support ticket or seek real-time support via the CometChat Dashboard. we'll be more than happy to help you resolve any issues promptly.

Webhooks:


  1. The Webhook API documentation provides comprehensive guidance on how to integrate and utilize Webhook functionality for real-time event-driven communication.
  2. 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:

  1. Your webhook endpoint must be accessible over HTTPS. This is essential to ensure the security and integrity of data transmission.
  2. 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.
  3. Ensure that your endpoint supports the HTTP POST method. Webhook payloads will be delivered via HTTP POST requests.
  4. Configure your endpoint to respond immediately to the CometChat server with a 200 OK response.
  5. 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.

ParametersTypeDescription
idstringUnique identifier of the webhook. It can have a maximum of 50 characters.
namestringDisplay name of the webhook. It can have a maximum of 50 characters.
webhookURLstringThe webhookURL field represents the target URL to which webhook events will be delivered.
useBasicAuthbooleanThe useBasicAuth field is a boolean flag that indicates whether basic authentication should be applied when sending webhook requests to the specified webhookURL
usernamestringThis field should contain the username or identifier associated with the authentication credentials.
passwordstringThis field should contain the secret password that corresponds to the provided username.
enabledbooleanThe enabled field is a boolean flag that determines whether a webhook is currently active and capable of receiving and processing incoming events

The list of triggers that are supported:

📘

Note: The below mentioned list of triggers are in Beta.


triggerIdDescription
message_sentThe hook triggers after the message is sent.
message_editedThe hook triggers after the message is edited.
message_deletedThe hook triggers after the message is deleted.
message_reaction_addedThe hook triggers after reaction is added to a message.
message_reaction_removedThe hook triggers after reaction is removed from a message.
user_blockedThe hook triggers when a user blocks another user.
user_unblockedThe hook triggers when a user unblocks another user.
group_createdThe hook triggers after the group is created.
group_updatedThe hook triggers after the group is updated.
group_deletedThe hook triggers after the group is deleted.
group_member_joinedThe hook triggers after a user joins a group.
group_member_leftThe hook triggers after a user leaves the group.
group_member_addedThe hook triggers after members are added to a group.
group_member_kickedThe hook triggers after members are kicked from a group.
group_member_bannedThe hook triggers after members are banned from a group.
group_member_unbannedThe hook triggers after members are unbanned from a group.
group_member_scope_changedThe hook triggers if the scope of a member changes in a group.
group_owner_transferredThe hook triggers if the owner of the group is changed.
user_connection_status_changedThe hook triggers after a user connects/disconnects from the websocket server.
message_delivery_receiptThe hook triggers when the client chat application confirms with Cometchat servers that a message was delivered.
message_read_receiptThe hook triggers when the client chat application confirms with Cometchat servers that a message was read.
call_initiatedThe hook triggers when the call is initiated.
call_startedThe hook triggers when the call is started.
call_participant_joinedThe hook triggers when a participant joins the call.
call_participant_leftThe hook triggers when a participant leaves the call.
call_endedThe hook triggers when the call is ended.
meeting_startedThe hook triggers when a meeting is started.
meeting_participant_joinedThe hook triggers when a participant joins the meeting.
meeting_participant_leftThe hook triggers when a participant leaves the meeting.
meeting_endedThe hook triggers when the meeting is ended.
recording_generatedThe hook triggers when the recording is generated.

Payload structure of events:

Groups:

group_created:
{  
   "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>"  
}
group_updated:
{
    "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>"
}
group_deleted:
{
    "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>"
}
group_owner_transferred:
{
    "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>"
}
group_member_added:
{
    "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>"
}
group_member_banned:
{
    "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>"
}
group_member_unbanned:
{
    "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>"
}
group_member_joined:
{
    "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>"
}
group_member_left:
{
    "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>"
}
group_member_changed:
{
    "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>"
}
group_member_kicked:
{
    "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:

message_sent:
{
    "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>"
}
message_edited:
{
    "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>"
}
message_deleted:
{
    "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>"
}
message_delivery_receipt:
{
    "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>"
}
message_read_receipt:
{
    "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>"
}
message_reaction_removed:
{
    "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>"
}
message_reaction_added:
{
    "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:

user_connection_status_changed:
{
    "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>"
}
user_blocked:
{
    "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>"
}
user_unblocked:
{
    "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>"
}
user_mentioned:
{
    "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

call_initiated:
{
    "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>"
}
call_started:
{
    "trigger": "call_started",
    "data": {
        "created_at": 1696934572,
        "sessionId": "<sessionId>"
    },
    "type": "call",
    "appId": "<appId>",
    "region": "<region>",
    "webhook": "<webhookID>"
}
call_ended:
{
    "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>"
}
call_participant_joined:
{
    "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>"
}
call_participant_left:
{
    "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>"
}
meeting_started:
{
    "trigger": "meeting_started",
    "data": {
        "created_at": 1696934692,
        "sessionId": "<sessionId>"
    },
    "type": "meet",
    "appId": "<appId>",
    "region": "<region>",
    "webhook": "<webhookID>"
}
meeting_participant_joined:
{
    "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>"
}
meeting_participant_left:
{
    "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>"
}
meeting_ended:
{
    "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>"
}
recording_generated:
{
    "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>"
}