Create a webhook
cometchat_create_webhookCreates a webhook that POSTs events, including message content, to an HTTPS URL, for trigger ids from cometchat_list_webhook_triggers. Prefer Basic Auth. Returns the triggers actually attached.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"app_id": "<app_id>",
"id": "<id>",
"name": "<name>",
"url": "<url>",
"triggers": "<triggers>"
},
"name": "cometchat_create_webhook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique webhook id, e.g. 'backend-sync' (letters, numbers, - and _) | |
| url | Yes | HTTPS endpoint that receives the events | |
| name | Yes | Display name | |
| app_id | Yes | The CometChat App ID (from cometchat_list_apps). | |
| confirm | No | Set true only after the user has explicitly agreed to this change. On a local connection that is enough; on the hosted server this change needs approval_code from the user's browser instead, and confirm is ignored. | |
| password | No | Basic Auth password (optional) | |
| triggers | Yes | Trigger ids from cometchat_list_webhook_triggers, e.g. message_sent | |
| username | No | Basic Auth username (optional) | |
| approval_code | No | The code the user got after approving this exact change in their browser. Only ever from the user; never make one up or reuse one for different arguments. | |
| retry_on_failure | No | Retry failed deliveries (default true) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Webhook id | |
| url | Yes | Endpoint URL | |
| app_id | Yes | App ID | |
| triggers | Yes | Triggers attached, as read back from CometChat | |
| basic_auth | Yes | Basic Auth on | |
| failed_triggers | No |