GET/api/v1/webhooks/rules
Which events go to which endpoint, checked from top to bottom.
- CLI
sendmock webhook rule list- MCP tool
sendmock_webhook_rule_list- In the app
- Webhooks > Rules
Answer
200 WebhookRule[]
/api/v1/webhooks/rulesWhich events go to which endpoint, checked from top to bottom.
sendmock webhook rule listsendmock_webhook_rule_list200 WebhookRule[]
/api/v1/webhooks/rulesAdd a rule.
sendmock webhook rule createsendmock_webhook_rule_createWebhookRuleInput : Body of POST and PATCH /api/v1/webhooks/rules.
| Field | Type | Description |
|---|---|---|
| name | string | A name for the rule, shown in the list.Example: Bounces to Slack |
| endpoint_id | Ulid | The endpoint each matching event is delivered to.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| events | AppEventType[] | 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.pruned |
| filter | RuleFilter | null | Which messages match, combining conditions with all, any and not; null matches every event. |
| is_enabled | boolean | Off rules are kept but skipped.Example: true |
201 WebhookRule
Errors: 400, as { error: { code, message } }
/api/v1/webhooks/rules/{ruleId}One webhook rule with its filter.
sendmock webhook rule show <ruleId>sendmock_webhook_rule_get200 WebhookRule
Errors: 404, as { error: { code, message } }
/api/v1/webhooks/rules/{ruleId}Change a rule; send only the changed keys.
sendmock webhook rule update <ruleId>sendmock_webhook_rule_updateWebhookRuleInputPatch
| Field | Type | Description |
|---|---|---|
| name? | string | A name for the rule, shown in the list.Example: Bounces to Slack |
| endpoint_id? | Ulid | The endpoint each matching event is delivered to.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| events? | AppEventType[] | 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.pruned |
| filter? | RuleFilter | null | Which messages match, combining conditions with all, any and not; null matches every event. |
| is_enabled? | boolean | Off rules are kept but skipped.Example: true |
200 WebhookRule
Errors: 400, 404, as { error: { code, message } }
/api/v1/webhooks/rules/{ruleId}Delete a rule.
sendmock webhook rule delete <ruleId>sendmock_webhook_rule_delete204 No content
Errors: 404, as { error: { code, message } }
/api/v1/webhooks/rules/{ruleId}/moveMove a rule up or down; answers the reordered list.
sendmock webhook rule move <ruleId>sendmock_webhook_rule_moveWebhookRuleMove : Body of POST /api/v1/webhooks/rules/{ruleId}/move.
| Field | Type | Description |
|---|---|---|
| direction | "up" | "down" | up moves the rule one place earlier in the order, down one place later.One of: up, downExample: up |
200 WebhookRule[]
Errors: 404, as { error: { code, message } }
/api/v1/webhooks/rules/previewWhich recent messages an unsaved rule would match.
sendmock webhook rule previewsendmock_webhook_rule_previewRulePreviewRequest : Body of POST /api/v1/webhooks/rules/preview.
| Field | Type | Description |
|---|---|---|
| events | AppEventType[] | The event types to test, as in the rule.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.pruned |
| filter | RuleFilter | null | The filter to test against recent messages; null matches all. |
200 RulePreviewResult
/api/v1/webhooks/rules/matchWhich webhooks an event would trigger, before an action fires it.
sendmock webhook rule matchsendmock_webhook_rule_matchWebhookRuleMatchRequest : Body of POST /api/v1/webhooks/rules/match: the event an action is about to fire.
| Field | Type | Description |
|---|---|---|
| event_type | AppEventType | The event the action fires.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 |
| subject_id? | Ulid | The email, SMS, payment or push notification the event is about; its stored fields are what the rule filters read.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| data? | object | Filter fields by name, for a message not stored yet or the values the event changes; they win over the stored message's. |
| include_requests? | boolean | Also render the request each matching endpoint would send for the event, with secrets masked.Example: true |
| webhook_endpoint_ids? | Ulid[] | With include_requests, render these endpoints' requests too, as chosen for the action instead of the rules (IDs from GET /api/v1/webhooks/endpoints). |
200 WebhookRuleMatchResult