create_webhook_endpoint
Create a webhook: name, public HTTPS URL, events (inbound.received, inbound.action.requested, inbound.action.completed, inbound.pages_ready, inbound.keywords_matched) and optional keyword rules (literal terms, any/all, exclusions). Active on save. Returns the whsec_ signing secret once, for the receiver's secure configuration. Agent keys can only create endpoints for their own agent_id and environment; member keys may use agent_id:null for account scope. Requires webhook.manage. Uses the same bounded control plane and tenant/agent/Live-Sandbox authorization as /api/v1/webhooks/endpoints. A repeated idempotency_key with the same input replays the stored result.
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": {
"name": "<name>",
"url": "<url>",
"agent_id": "<agent_id>",
"environment": "<environment>",
"event_types": "<event_types>",
"rules": "<rules>",
"idempotency_key": "<idempotency_key>"
},
"name": "create_webhook_endpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public HTTPS URL on port 443 (no credentials, fragment or private host) that receives the signed POSTs. | |
| name | Yes | Label shown in the dashboard and delivery log. | |
| rules | Yes | Up to 10 keyword rules, each with a unique id: source (envelope, letter for the contents, or any), match (any or all), 1–20 terms and optional exclude_terms. inbound.keywords_matched fires when a rule matches. | |
| agent_id | Yes | Agent keys: your own agent id. Member keys: an agent id, or null for account scope. | |
| environment | Yes | live or test. Agent keys can only use their own environment; an endpoint only receives events from its environment. | |
| event_types | Yes | Events to deliver (1–32, unique). Inbound mail: inbound.received, inbound.action.requested, inbound.action.completed, inbound.pages_ready, inbound.keywords_matched. Outbound mail: mail.pending_approval, mail.submitted, mail.ready, mail.mailed, mail.delivered, mail.failed, mail.cancelled. Batches: batch.submitted, batch.completed, batch.partially_completed, batch.failed, batch.cancelled, batch.piece.scanned, batch.piece.confirmed. | |
| idempotency_key | Yes | A UUID for this one intent; the same key replays the identical request. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |