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

API reference

Inbound routes

POST/api/v1/inbound-routes

Add a route.

CLI
sendmock route create
MCP tool
sendmock_inbound_route_create
In the app
Webhooks > Inbound routes > Add route

Request body (application/json)

InboundRouteInput : Body of POST /api/v1/inbound-routes and PATCH /api/v1/inbound-routes/{routeId}.

FieldTypeDescription
prioritynumber
Lower runs first.Example: 10
descriptionstring
A name for the route, shown in the list.Example: Ticket replies to the helpdesk
filterInboundRouteFilter
Which incoming emails the route takes.
actionsInboundRouteAction[]
What the route does with a matching email, in order.

Answer

201 InboundRoute

Errors: 400, as { error: { code, message } }

Try it in Demo mode

PATCH/api/v1/inbound-routes/{routeId}

Change a route.

CLI
sendmock route update <routeId>
MCP tool
sendmock_inbound_route_update
In the app
Webhooks > Inbound routes > Edit, move

Request body (application/json)

InboundRouteInput : Body of POST /api/v1/inbound-routes and PATCH /api/v1/inbound-routes/{routeId}.

FieldTypeDescription
prioritynumber
Lower runs first.Example: 10
descriptionstring
A name for the route, shown in the list.Example: Ticket replies to the helpdesk
filterInboundRouteFilter
Which incoming emails the route takes.
actionsInboundRouteAction[]
What the route does with a matching email, in order.

Answer

200 InboundRoute

Errors: 400, 404, as { error: { code, message } }

Try it in Demo mode

POST/api/v1/inbound-routes/test

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

CLI
sendmock route test
MCP tool
sendmock_inbound_route_test
In the app
Webhooks > Inbound routes > route sheet > Preview

Request body (application/json)

InboundRouteTestRequest : Body of POST /api/v1/inbound-routes/test: a filter to try on recent incoming emails.

FieldTypeDescription
filterInboundRouteFilter
The filter to try on the 50 most recent incoming emails.

Answer

200 InboundRouteTestResult

Try it in Demo mode

POST/api/v1/inbound-routes/match

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

CLI
sendmock route match
MCP tool
sendmock_inbound_route_match
In the app
Mail > Reply, Reply all, Forward > Delivers to

Request body (application/json)

InboundRouteMatchRequest : Body of POST /api/v1/inbound-routes/match: the email about to arrive.

FieldTypeDescription
tostring[]
The recipients the incoming email would have.
cc?string[]
Copied recipients; routes read them like to.
headers?object
Headers by name.

Answer

200 InboundRouteMatchResult

Try it in Demo mode