GET/api/v1/inbound-routes
Routes for incoming email, in priority order.
- CLI
sendmock route list- MCP tool
sendmock_inbound_route_list- In the app
- Webhooks > Inbound routes
Answer
200 InboundRoute[]
/api/v1/inbound-routesRoutes for incoming email, in priority order.
sendmock route listsendmock_inbound_route_list200 InboundRoute[]
/api/v1/inbound-routesAdd a route.
sendmock route createsendmock_inbound_route_createInboundRouteInput : Body of POST /api/v1/inbound-routes and PATCH /api/v1/inbound-routes/{routeId}.
| Field | Type | Description |
|---|---|---|
| priority | number | Lower runs first.Example: 10 |
| description | string | A name for the route, shown in the list.Example: Ticket replies to the helpdesk |
| filter | InboundRouteFilter | Which incoming emails the route takes. |
| actions | InboundRouteAction[] | What the route does with a matching email, in order. |
201 InboundRoute
Errors: 400, as { error: { code, message } }
/api/v1/inbound-routes/{routeId}Change a route.
sendmock route update <routeId>sendmock_inbound_route_updateInboundRouteInput : Body of POST /api/v1/inbound-routes and PATCH /api/v1/inbound-routes/{routeId}.
| Field | Type | Description |
|---|---|---|
| priority | number | Lower runs first.Example: 10 |
| description | string | A name for the route, shown in the list.Example: Ticket replies to the helpdesk |
| filter | InboundRouteFilter | Which incoming emails the route takes. |
| actions | InboundRouteAction[] | What the route does with a matching email, in order. |
200 InboundRoute
Errors: 400, 404, as { error: { code, message } }
/api/v1/inbound-routes/{routeId}Delete a route.
sendmock route delete <routeId>sendmock_inbound_route_delete204 No content
Errors: 404, as { error: { code, message } }
/api/v1/inbound-routes/testWhich routes a recipient or header would match, and what runs.
sendmock route testsendmock_inbound_route_testInboundRouteTestRequest : Body of POST /api/v1/inbound-routes/test: a filter to try on recent incoming emails.
| Field | Type | Description |
|---|---|---|
| filter | InboundRouteFilter | The filter to try on the 50 most recent incoming emails. |
200 InboundRouteTestResult
/api/v1/inbound-routes/matchWhere an incoming email would go: the routes and webhook rules it would run.
sendmock route matchsendmock_inbound_route_matchInboundRouteMatchRequest : Body of POST /api/v1/inbound-routes/match: the email about to arrive.
| Field | Type | Description |
|---|---|---|
| to | string[] | The recipients the incoming email would have. |
| cc? | string[] | Copied recipients; routes read them like to. |
| headers? | object | Headers by name. |
200 InboundRouteMatchResult