- 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.
| 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 |
Constraints
| Item | Constraint | Notes |
|---|---|---|
| Maximum webhooks per app | 25 | Contact support if you need more |
| Webhook URL | 255 characters max | Must be a publicly accessible HTTPS endpoint |
| Webhook ID | 50 characters, alphanumeric (UTF8mb4, no spaces) | Unique identifier for managing the webhook |
| Authentication username | 50 characters, alphanumeric (no spaces) | Used for HTTP Basic Authentication |
| Authentication password | 100 characters, alphanumeric (no spaces) | Keep secure; used to verify webhook requests |
The list of triggers that are supported
| 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. |