Set Webhook
set_webhookCreate or update a business outbound webhook (URL + subscribed events). Returns a webhook secret on first creation only.
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": {
"webhook_url": "<webhook_url>"
},
"name": "set_webhook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Existing webhook ID to update (omit to create new). | |
| events | No | Event types to subscribe to (get_webhook lists the supported types). | |
| preset | No | Start the body from a CRM field map. Presets are editable starting points, not exact vendor formats. Ignored when payload_template is also sent. | |
| is_active | No | Enable or disable delivery. | |
| body_format | No | json (default) or form (application/x-www-form-urlencoded, nested keys flattened with dots). | |
| business_id | No | Business ID (optional only when the token can access exactly one business). | |
| description | No | Human label for this webhook. | |
| http_method | No | HTTP method for delivery (default POST). | |
| webhook_url | Yes | HTTPS/HTTP destination URL for event delivery. | |
| custom_headers | No | Extra headers the CRM needs, as { "Header-Name": "value" } (max 20). A null value keeps the saved value for that name. Content-Type, Host, Content-Length and X-KaiCalls-* cannot be set. Values are never returned. | |
| payload_template | No | Shape the body for a CRM: { "fields": { "<their field>": "<path>" | { "value": <fixed> } } }. A path reads the standard event body (e.g. "data.phone", "occurred_at"); "a|b" takes the first with a value; a dot in the field name nests it ("contact.phone"). Missing paths send null. null restores the standard body. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when success is false | |
| events | No | ||
| message | No | ||
| success | Yes | Whether the tool completed successfully | |
| webhook | No | ||
| business_id | No | ||
| webhook_secret | No |