GET/api/v1/tag-rules
Every tag rule, in the order they run.
- CLI
sendmock email tag-rules list- MCP tool
sendmock_tag_rule_list- In the app
- Settings > Email > Tag rules
Answer
200 TagRule[]
/api/v1/tag-rulesEvery tag rule, in the order they run.
sendmock email tag-rules listsendmock_tag_rule_list200 TagRule[]
/api/v1/tag-rulesAdd a tag rule at the end of the list.
sendmock email tag-rules createsendmock_tag_rule_createTagRuleInput : Body of POST and PATCH /api/v1/tag-rules.
| Field | Type | Description |
|---|---|---|
| name | string | A name for the rule, shown in the list.Example: Tag password resets |
| filter | RuleFilter | null | The webhook rule filter, over email fields; null matches every email. |
| tag | string | The tag added to each matching email.Example: password-reset |
| is_enabled | boolean | Off rules are kept but skipped.Example: true |
201 TagRule
Errors: 400, as { error: { code, message } }
/api/v1/tag-rules/{ruleId}Change a tag rule, or switch it on or off.
sendmock email tag-rules update <ruleId>sendmock_tag_rule_updateTagRuleInputPatch
| Field | Type | Description |
|---|---|---|
| name? | string | A name for the rule, shown in the list.Example: Tag password resets |
| filter? | RuleFilter | null | The webhook rule filter, over email fields; null matches every email. |
| tag? | string | The tag added to each matching email.Example: password-reset |
| is_enabled? | boolean | Off rules are kept but skipped.Example: true |
200 TagRule
Errors: 400, 404, as { error: { code, message } }
/api/v1/tag-rules/{ruleId}Delete a tag rule.
sendmock email tag-rules delete <ruleId>sendmock_tag_rule_delete204 No content
Errors: 404, as { error: { code, message } }
/api/v1/tag-rules/{ruleId}/moveMove a tag rule up or down.
sendmock email tag-rules move <ruleId>sendmock_tag_rule_moveMessageRuleMove : Body of POST /api/v1/tag-rules/{ruleId}/move and /forward-rules/{ruleId}/move.
| Field | Type | Description |
|---|---|---|
| direction | "up" | "down" | up moves the rule one place earlier in the order, down one place later.One of: up, downExample: up |
200 TagRule[]
Errors: 404, as { error: { code, message } }