Preview: SendMock has no stable release yet. These docs follow develop.

CLI reference

Webhook rules commands

sendmock webhook rule create

Add a rule.

sendmock webhook rule create [flags]
FlagTypeDescription
--name <name>requiredstring
A name for the rule, shown in the list.Example: Bounces to Slack
--endpoint-id <endpoint-id>requiredstring
The endpoint each matching event is delivered to.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
--event <event>requiredstring[] (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.
--enabledrequiredboolean
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

sendmock webhook rule delete

Delete a rule.

sendmock webhook rule delete <ruleId> [flags]
ArgumentTypeDescription
<ruleId>requiredstring
The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--yesboolean
Confirms a destructive command; without it the command stops.

Example

sendmock webhook rule delete 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --yes

Output with --json: nothing. Exit codes: 0, 1, 2, 3.

API
DELETE/api/v1/webhooks/rules/{ruleId}
MCP tool
sendmock_webhook_rule_delete
In the app
Webhooks > Rules > Delete

sendmock webhook rule match

Which webhooks an event would trigger, before an action fires it.

sendmock webhook rule match [flags]
FlagTypeDescription
--event-type <event-type>requiredstring
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 <subject-id>string
The email, SMS, payment or push notification the event is about; its stored fields are what the rule filters read.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
--field <field>object (JSON)
Filter fields by name, for a message not stored yet or the values the event changes; they win over the stored message's.
--include-requestsboolean
Also render the request each matching endpoint would send for the event, with secrets masked. --no-include-requests sets it to false.
--webhook <webhook>string[] (repeat for more)
With include_requests, render these endpoints' requests too, as chosen for the action instead of the rules (IDs from GET /api/v1/webhooks/endpoints).Example: ["01JB7T9Q2RENDPOINT00000000"]

Example

sendmock webhook rule match --event-type email.bounced --include-requests --webhook 01JB7T9Q2RENDPOINT00000000

Output with --json: WebhookRuleMatchResult. Exit codes: 0, 1, 2.

API
POST/api/v1/webhooks/rules/match
MCP tool
sendmock_webhook_rule_match
In the app
Webhooks row and menu hints on every simulating action; Payload on each webhook

sendmock webhook rule move

Move a rule up or down; answers the reordered list.

sendmock webhook rule move <ruleId> [flags]
ArgumentTypeDescription
<ruleId>requiredstring
The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--direction <direction>requiredstring
up moves the rule one place earlier in the order, down one place later.One of: up, downExample: up

Example

sendmock webhook rule move 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --direction up

Output with --json: WebhookRule[]. Exit codes: 0, 1, 2, 3.

API
POST/api/v1/webhooks/rules/{ruleId}/move
MCP tool
sendmock_webhook_rule_move
In the app
Webhooks > Rules > Move up, Move down

sendmock webhook rule preview

Which recent messages an unsaved rule would match.

sendmock webhook rule preview [flags]
FlagTypeDescription
--event <event>requiredstring[] (repeat for more)
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.prunedExample: ["email.received"]
--filter <filter>object (JSON)
The filter to test against recent messages; null matches all.

Example

sendmock webhook rule preview --event email.received

Output with --json: RulePreviewResult. Exit codes: 0, 1, 2.

API
POST/api/v1/webhooks/rules/preview
MCP tool
sendmock_webhook_rule_preview
In the app
Webhooks > Rules > rule sheet > Preview

sendmock webhook rule show

One webhook rule with its filter.

sendmock webhook rule show <ruleId>
ArgumentTypeDescription
<ruleId>requiredstring
The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Example

sendmock webhook rule show 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Output with --json: WebhookRule. Exit codes: 0, 1, 2, 3.

API
GET/api/v1/webhooks/rules/{ruleId}
MCP tool
sendmock_webhook_rule_get
In the app
Webhooks > Rules > Edit

sendmock webhook rule update

Change a rule; send only the changed keys.

sendmock webhook rule update <ruleId> [flags]
ArgumentTypeDescription
<ruleId>requiredstring
The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--name <name>string
A name for the rule, shown in the list.Example: Bounces to Slack
--endpoint-id <endpoint-id>string
The endpoint each matching event is delivered to.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
--event <event>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.
--enabledboolean
Off rules are kept but skipped. --no-enabled sets it to false.

Example

sendmock webhook rule update 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --name 'Bounces to Slack' --event email.bounced --event email.complained

Output with --json: WebhookRule. Exit codes: 0, 1, 2, 3.

API
PATCH/api/v1/webhooks/rules/{ruleId}
MCP tool
sendmock_webhook_rule_update
In the app
Webhooks > Rules > rule > Save changes, enabled switch