sendmock webhook rule create
Add a rule.
sendmock webhook rule create [flags]
| Flag | Type | Description |
|---|---|---|
| --name <name>required | string | A name for the rule, shown in the list.Example: Bounces to Slack |
| --endpoint-id <endpoint-id>required | string | The endpoint each matching event is delivered to.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| --event <event>required | string[] (repeat for more) | 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 <filter> | object (JSON) | Which messages match, combining conditions with all, any and not; null matches every event. |
| --enabledrequired | boolean | Off rules are kept but skipped. --no-enabled sets it to false. |
Example
sendmock webhook rule create --name 'Bounces to Slack' --endpoint-id 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --event email.bounced --event email.complained --enabled
Output with --json: WebhookRule. Exit codes: 0, 1, 2.
- API
- POST
/api/v1/webhooks/rules - MCP tool
sendmock_webhook_rule_create- In the app
- Webhooks > Rules > Add rule