sendmock_webhook_rule_create
Add a rule.
Toolset webhooks.
| Input | Type | Description |
|---|---|---|
| namerequired | string | A name for the rule, shown in the list.Example: Bounces to Slack |
| endpoint_idrequired | string | The endpoint each matching event is delivered to.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| eventsrequired | string[] | The event types the rule listens to.One of: email.received, email.inbound, email.opened, email.clicked, email.delivered, email.deferred, email.bounced, email.complained, email.unsubscribed, email.released, email.deleted, sms.sent, sms.status, sms.opened, sms.inbound, sms.reply_webhook, verify.started, verify.checked, verify.expired, push.sent, push.failed, http.captured, payment.created, payment.authorized, payment.succeeded, payment.failed, payment.canceled, payment.refunded, payment.partially_refunded, payment.dispute_opened, payment.dispute_updated, payment.dispute_closed, checkout.completed, checkout.expired, subscription.created, subscription.renewed, subscription.payment_failed, subscription.canceled, webhook.delivered, webhook.failed, test.ping, traffic.prunedExample: ["email.bounced","email.complained"] |
| filter | object | Which messages match, combining conditions with all, any and not; null matches every event. |
| is_enabledrequired | boolean | Off rules are kept but skipped.Example: true |
Example call
{
"name": "sendmock_webhook_rule_create",
"arguments": {
"name": "Bounces to Slack",
"endpoint_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
"events": [
"email.bounced",
"email.complained"
],
"is_enabled": true
}
}Result: WebhookRule
- API
- POST
/api/v1/webhooks/rules - CLI
sendmock webhook rule create- In the app
- Webhooks > Rules > Add rule