Create Webhook
create-webhookCreate a webhook subscription to deliver selected Lettr events—or all events—to an HTTPS endpoint with none, basic, or OAuth2 authentication.
Instructions
Create a new webhook subscription.
Required: name, url, auth_type, events_mode.
When auth_type is "basic", auth_username and auth_password are required.
When auth_type is "oauth2", oauth_client_id, oauth_client_secret and oauth_token_url are required.
When events_mode is "selected", the events array is required and must contain only valid event type strings.
When events_mode is "all", the webhook receives every event.
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>",
"auth_type": "<auth_type>",
"events_mode": "<events_mode>"
},
"name": "create-webhook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS URL that will receive webhook POSTs | |
| name | Yes | Human-readable name (max 255 chars) | |
| events | No | List of event types (required when events_mode=selected). Use the canonical fully-prefixed names (e.g. "message.delivery", "engagement.open"). | |
| auth_type | Yes | Authentication scheme for delivery requests | |
| events_mode | Yes | Subscribe to all events or an explicit subset | |
| auth_password | No | Basic auth password (required when auth_type=basic) | |
| auth_username | No | Basic auth username (required when auth_type=basic) | |
| oauth_client_id | No | OAuth2 client ID (required when auth_type=oauth2) | |
| oauth_token_url | No | OAuth2 token URL (required when auth_type=oauth2) | |
| oauth_client_secret | No | OAuth2 client secret (required when auth_type=oauth2) |