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

CLI reference

Inbound routes commands

sendmock route create

Add a route.

sendmock route create [flags]
FlagTypeDescription
--priority <priority>requirednumber
Lower runs first.Example: 10
--description <description>requiredstring
A name for the route, shown in the list.Example: Ticket replies to the helpdesk
--filter <filter>requiredInboundRouteFilter (JSON)
Which incoming emails the route takes.
--actions <actions>requiredInboundRouteAction[] (JSON)
What the route does with a matching email, in order.Example: [{"kind":"forward_url","url":"http://localhost:8000/webhooks/mail"}]

Example

sendmock route create --priority 10 --description 'Ticket replies to the helpdesk' --filter '{"kind":"match_recipient","pattern":"reply\\+(?P<token>.+)@reply.app.test"}' --actions '[{"kind":"forward_url","url":"http://localhost:8000/webhooks/mail"}]'

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

API
POST/api/v1/inbound-routes
MCP tool
sendmock_inbound_route_create
In the app
Webhooks > Inbound routes > Add route

sendmock route delete

Delete a route.

sendmock route delete <routeId> [flags]
ArgumentTypeDescription
<routeId>requiredstring
The inbound route's ID, from GET /api/v1/inbound-routes.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--yesboolean
Confirms a destructive command; without it the command stops.

Example

sendmock route delete 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --yes

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

API
DELETE/api/v1/inbound-routes/{routeId}
MCP tool
sendmock_inbound_route_delete
In the app
Webhooks > Inbound routes > Delete

sendmock route match

Where an incoming email would go: the routes and webhook rules it would run.

sendmock route match [flags]
FlagTypeDescription
--to <to>requiredstring[] (repeat for more)
The recipients the incoming email would have.Example: ["[email protected]"]
--cc <cc>string[] (repeat for more)
Copied recipients; routes read them like to.Example: ["[email protected]"]
--headers <headers>object (JSON)
Headers by name.

Example

sendmock route match --to [email protected] --cc [email protected]

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

API
POST/api/v1/inbound-routes/match
MCP tool
sendmock_inbound_route_match
In the app
Mail > Reply, Reply all, Forward > Delivers to

sendmock route test

Which routes a recipient or header would match, and what runs.

sendmock route test [flags]
FlagTypeDescription
--filter <filter>requiredInboundRouteFilter (JSON)
The filter to try on the 50 most recent incoming emails.

Example

sendmock route test --filter '{"kind":"match_recipient","pattern":"reply\\+(?P<token>.+)@reply.app.test"}'

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

API
POST/api/v1/inbound-routes/test
MCP tool
sendmock_inbound_route_test
In the app
Webhooks > Inbound routes > route sheet > Preview

sendmock route update

Change a route.

sendmock route update <routeId> [flags]
ArgumentTypeDescription
<routeId>requiredstring
The inbound route's ID, from GET /api/v1/inbound-routes.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--priority <priority>requirednumber
Lower runs first.Example: 10
--description <description>requiredstring
A name for the route, shown in the list.Example: Ticket replies to the helpdesk
--filter <filter>requiredInboundRouteFilter (JSON)
Which incoming emails the route takes.
--actions <actions>requiredInboundRouteAction[] (JSON)
What the route does with a matching email, in order.Example: [{"kind":"forward_url","url":"http://localhost:8000/webhooks/mail"}]

Example

sendmock route update 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --priority 10 --description 'Ticket replies to the helpdesk' --filter '{"kind":"match_recipient","pattern":"reply\\+(?P<token>.+)@reply.app.test"}' --actions '[{"kind":"forward_url","url":"http://localhost:8000/webhooks/mail"}]'

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

API
PATCH/api/v1/inbound-routes/{routeId}
MCP tool
sendmock_inbound_route_update
In the app
Webhooks > Inbound routes > Edit, move