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

API reference

Forward rules

POST/api/v1/forward-rules

Add a forward rule at the end of the list.

CLI
sendmock email forward-rules create
MCP tool
sendmock_forward_rule_create
In the app
Settings > Email > Auto-forward rules > Add rule

Request body (application/json)

ForwardRuleInput : Body of POST and PATCH /api/v1/forward-rules.

FieldTypeDescription
namestring
A name for the rule, shown in the list.Example: Invoices to finance QA
filterRuleFilter | null
The webhook rule filter, over email fields; null matches every email.
tostring[]
Real addresses; each must be on the relay allowlist.
is_enabledboolean
Off rules are kept but skipped.Example: true

Answer

201 ForwardRule

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

Try it in Demo mode

PATCH/api/v1/forward-rules/{ruleId}

Change a forward rule, or switch it on or off.

CLI
sendmock email forward-rules update <ruleId>
MCP tool
sendmock_forward_rule_update
In the app
Settings > Email > Auto-forward rules > Edit, enabled switch

Request body (application/json)

ForwardRuleInputPatch

FieldTypeDescription
name?string
A name for the rule, shown in the list.Example: Invoices to finance QA
filter?RuleFilter | null
The webhook rule filter, over email fields; null matches every email.
to?string[]
Real addresses; each must be on the relay allowlist.
is_enabled?boolean
Off rules are kept but skipped.Example: true

Answer

200 ForwardRule

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

Try it in Demo mode

POST/api/v1/forward-rules/{ruleId}/move

Move a forward rule up or down.

CLI
sendmock email forward-rules move <ruleId>
MCP tool
sendmock_forward_rule_move
In the app
Settings > Email > Auto-forward rules > Move up, Move down

Request body (application/json)

MessageRuleMove : Body of POST /api/v1/tag-rules/{ruleId}/move and /forward-rules/{ruleId}/move.

FieldTypeDescription
direction"up" | "down"
up moves the rule one place earlier in the order, down one place later.One of: up, downExample: up

Answer

200 ForwardRule[]

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

Try it in Demo mode