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

CLI reference

Tag rules commands

sendmock email tag-rules create

Add a tag rule at the end of the list.

sendmock email tag-rules create [flags]
FlagTypeDescription
--name <name>requiredstring
A name for the rule, shown in the list.Example: Tag password resets
--filter <filter>object (JSON)
The webhook rule filter, over email fields; null matches every email.
--tag <tag>requiredstring
The tag added to each matching email.Example: password-reset
--enabledrequiredboolean
Off rules are kept but skipped. --no-enabled sets it to false.

Example

sendmock email tag-rules create --name 'Tag password resets' --tag password-reset --enabled

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

API
POST/api/v1/tag-rules
MCP tool
sendmock_tag_rule_create
In the app
Settings > Email > Tag rules > Add rule

sendmock email tag-rules delete

Delete a tag rule.

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

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

API
DELETE/api/v1/tag-rules/{ruleId}
MCP tool
sendmock_tag_rule_delete
In the app
Settings > Email > Tag rules > Delete

sendmock email tag-rules list

Every tag rule, in the order they run.

sendmock email tag-rules list

Example

sendmock email tag-rules list

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

API
GET/api/v1/tag-rules
MCP tool
sendmock_tag_rule_list
In the app
Settings > Email > Tag rules

sendmock email tag-rules move

Move a tag rule up or down.

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

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

API
POST/api/v1/tag-rules/{ruleId}/move
MCP tool
sendmock_tag_rule_move
In the app
Settings > Email > Tag rules > Move up, Move down

sendmock email tag-rules update

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

sendmock email tag-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: Tag password resets
--filter <filter>object (JSON)
The webhook rule filter, over email fields; null matches every email.
--tag <tag>string
The tag added to each matching email.Example: password-reset
--enabledboolean
Off rules are kept but skipped. --no-enabled sets it to false.

Example

sendmock email tag-rules update 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --name 'Tag password resets' --tag password-reset

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

API
PATCH/api/v1/tag-rules/{ruleId}
MCP tool
sendmock_tag_rule_update
In the app
Settings > Email > Tag rules > Edit, enabled switch