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

CLI reference

Forward rules commands

sendmock email forward-rules create

Add a forward rule at the end of the list.

sendmock email forward-rules create [flags]
FlagTypeDescription
--name <name>requiredstring
A name for the rule, shown in the list.Example: Invoices to finance QA
--filter <filter>object (JSON)
The webhook rule filter, over email fields; null matches every email.
--to <to>requiredstring[] (repeat for more)
Real addresses; each must be on the relay allowlist.Example: ["[email protected]"]
--enabledrequiredboolean
Off rules are kept but skipped. --no-enabled sets it to false.

Example

sendmock email forward-rules create --name 'Invoices to finance QA' --to [email protected] --enabled

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

API
POST/api/v1/forward-rules
MCP tool
sendmock_forward_rule_create
In the app
Settings > Email > Auto-forward rules > Add rule

sendmock email forward-rules delete

Delete a forward rule.

sendmock email forward-rules 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 email forward-rules delete 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --yes

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

API
DELETE/api/v1/forward-rules/{ruleId}
MCP tool
sendmock_forward_rule_delete
In the app
Settings > Email > Auto-forward rules > Delete

sendmock email forward-rules list

Every forward rule, in the order they run.

sendmock email forward-rules list

Example

sendmock email forward-rules list

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

API
GET/api/v1/forward-rules
MCP tool
sendmock_forward_rule_list
In the app
Settings > Email > Auto-forward rules

sendmock email forward-rules move

Move a forward rule up or down.

sendmock email forward-rules 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 email forward-rules move 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --direction up

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

API
POST/api/v1/forward-rules/{ruleId}/move
MCP tool
sendmock_forward_rule_move
In the app
Settings > Email > Auto-forward rules > Move up, Move down

sendmock email forward-rules update

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

sendmock email forward-rules 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: Invoices to finance QA
--filter <filter>object (JSON)
The webhook rule filter, over email fields; null matches every email.
--to <to>string[] (repeat for more)
Real addresses; each must be on the relay allowlist.Example: ["[email protected]"]
--enabledboolean
Off rules are kept but skipped. --no-enabled sets it to false.

Example

sendmock email forward-rules update 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --name 'Invoices to finance QA' --to [email protected]

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

API
PATCH/api/v1/forward-rules/{ruleId}
MCP tool
sendmock_forward_rule_update
In the app
Settings > Email > Auto-forward rules > Edit, enabled switch