CLI reference
Outcome rules commands
sendmock outcome-rule email create
Add an email outcome rule.
sendmock outcome-rule email create [flags]
| Flag | Type | Description |
|---|
| --pattern <pattern>required | string | Exact address, or * wildcards, e.g. *@bounce.qa.test.Example: *@bounce.qa.test |
| --outcome <outcome>required | string | What happens to a matching email: delivered, hard_bounce, soft_bounce, complaint, unsubscribe or reject (refused during SMTP RCPT and the HTTP send).One of: delivered, hard_bounce, soft_bounce, complaint, unsubscribe, rejectExample: hard_bounce |
| --smtp-code <smtp-code> | string | SMTP reply for bounces and rejects, e.g. 550 5.1.1.Example: 550 5.1.1 |
| --diagnostic <diagnostic> | string | The diagnostic text sent with the SMTP code.Example: user unknown |
| --note <note>required | string | Why the rule exists, shown in the list.Example: Bounce every QA signup |
| --enabledrequired | boolean | Off rules are kept but skipped. --no-enabled sets it to false. |
Example
sendmock outcome-rule email create --pattern '*@bounce.qa.test' --outcome hard_bounce --note 'Bounce every QA signup' --enabled --smtp-code '550 5.1.1' --diagnostic 'user unknown'
Output with --json: EmailOutcomeRule. Exit codes: 0, 1, 2.
- API
- POST
/api/v1/outcome-rules/email - MCP tool
sendmock_outcome_rule_create- In the app
- Settings > Email > Custom outcome addresses > Add address
sendmock outcome-rule email delete
Delete an email outcome rule.
sendmock outcome-rule email delete <ruleId> [flags]
| Argument | Type | Description |
|---|
| <ruleId>required | string | The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| Flag | Type | Description |
|---|
| --yes | boolean | Confirms a destructive command; without it the command stops. |
Example
sendmock outcome-rule email delete 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --yes
Output with --json: nothing. Exit codes: 0, 1, 2.
- API
- DELETE
/api/v1/outcome-rules/email/{ruleId} - MCP tool
sendmock_outcome_rule_delete- In the app
- Settings > Email > Custom outcome addresses > Delete
sendmock outcome-rule email list
Email outcome rules, checked from top to bottom.
sendmock outcome-rule email list
Example
sendmock outcome-rule email list
Output with --json: EmailOutcomeRule[]. Exit codes: 0, 1, 2.
- API
- GET
/api/v1/outcome-rules/email - MCP tool
sendmock_outcome_rule_list- In the app
- Settings > Email > Custom outcome addresses
sendmock outcome-rule email move
Move an email outcome rule up or down.
sendmock outcome-rule email move <ruleId> [flags]
| Argument | Type | Description |
|---|
| <ruleId>required | string | The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| Flag | Type | Description |
|---|
| --direction <direction>required | string | up moves the rule one place earlier in the order, down one place later.One of: up, downExample: up
|
Example
sendmock outcome-rule email move 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --direction up
Output with --json: EmailOutcomeRule[]. Exit codes: 0, 1, 2, 3.
- API
- POST
/api/v1/outcome-rules/email/{ruleId}/move - MCP tool
sendmock_outcome_rule_move- In the app
- Settings > Email > Custom outcome addresses > Move up, Move down
sendmock outcome-rule email test
Which custom rule, magic address or profile decides an address's outcome.
sendmock outcome-rule email test <address>
| Argument | Type | Description |
|---|
| <address>required | string | The address to test against the outcome rules and magic addresses.Example: [email protected] |
Output with --json: OutcomeTestResult. Exit codes: 0, 1, 2.
- API
- POST
/api/v1/outcome-rules/email/test - MCP tool
sendmock_outcome_rule_test- In the app
- Settings > Email > Test an address
sendmock outcome-rule email update
Change an email outcome rule; send only the changed keys.
sendmock outcome-rule email update <ruleId> [flags]
| Argument | Type | Description |
|---|
| <ruleId>required | string | The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| Flag | Type | Description |
|---|
| --pattern <pattern> | string | Exact address, or * wildcards, e.g. *@bounce.qa.test.Example: *@bounce.qa.test |
| --outcome <outcome> | string | What happens to a matching email: delivered, hard_bounce, soft_bounce, complaint, unsubscribe or reject (refused during SMTP RCPT and the HTTP send).One of: delivered, hard_bounce, soft_bounce, complaint, unsubscribe, rejectExample: hard_bounce |
| --smtp-code <smtp-code> | string | SMTP reply for bounces and rejects, e.g. 550 5.1.1.Example: 550 5.1.1 |
| --diagnostic <diagnostic> | string | The diagnostic text sent with the SMTP code.Example: user unknown |
| --note <note> | string | Why the rule exists, shown in the list.Example: Bounce every QA signup |
| --enabled | boolean | Off rules are kept but skipped. --no-enabled sets it to false. |
Example
sendmock outcome-rule email update 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --pattern '*@bounce.qa.test' --outcome hard_bounce
Output with --json: EmailOutcomeRule. Exit codes: 0, 1, 2, 3.
- API
- PATCH
/api/v1/outcome-rules/email/{ruleId} - MCP tool
sendmock_outcome_rule_update- In the app
- Settings > Email > Custom outcome addresses > Edit, enabled switch
sendmock outcome-rule sms create
Add an SMS outcome rule.
sendmock outcome-rule sms create [flags]
| Flag | Type | Description |
|---|
| --match-field <match-field>required | string | Match the pattern against the recipient (to) or the sender (from).One of: to, fromExample: to |
| --pattern <pattern>required | string | Exact E.164 number, or * for any digits, e.g. +1555777*.Example: +1555777* |
| --outcome <outcome>required | string | What happens to a matching message: reject (the send fails), undelivered, failed, delayed_delivery or read.One of: reject, undelivered, failed, delayed_delivery, readExample: undelivered |
| --error-code <error-code> | string | Required for reject, undelivered and failed.Example: 30003 |
| --delay-seconds <delay-seconds> | number | Required for delayed_delivery.Example: 30 |
| --note <note>required | string | Why the rule exists, shown in the list.Example: Unreachable handset for the retry test |
| --enabledrequired | boolean | Off rules are kept but skipped. --no-enabled sets it to false. |
Example
sendmock outcome-rule sms create --match-field to --pattern '+1555777*' --outcome undelivered --note 'Unreachable handset for the retry test' --enabled --error-code 30003 --delay-seconds 30
Output with --json: SmsOutcomeRule. Exit codes: 0, 1, 2.
- API
- POST
/api/v1/outcome-rules/sms - MCP tool
sendmock_outcome_rule_create- In the app
- Settings > SMS > Custom outcome numbers > Add number
sendmock outcome-rule sms delete
Delete an SMS outcome rule.
sendmock outcome-rule sms delete <ruleId> [flags]
| Argument | Type | Description |
|---|
| <ruleId>required | string | The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| Flag | Type | Description |
|---|
| --yes | boolean | Confirms a destructive command; without it the command stops. |
Example
sendmock outcome-rule sms delete 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --yes
Output with --json: nothing. Exit codes: 0, 1, 2.
- API
- DELETE
/api/v1/outcome-rules/sms/{ruleId} - MCP tool
sendmock_outcome_rule_delete- In the app
- Settings > SMS > Custom outcome numbers > Delete
sendmock outcome-rule sms list
SMS outcome rules, checked from top to bottom.
sendmock outcome-rule sms list
Example
sendmock outcome-rule sms list
Output with --json: SmsOutcomeRule[]. Exit codes: 0, 1, 2.
- API
- GET
/api/v1/outcome-rules/sms - MCP tool
sendmock_outcome_rule_list- In the app
- Settings > SMS > Custom outcome numbers
sendmock outcome-rule sms move
Move an SMS outcome rule up or down.
sendmock outcome-rule sms move <ruleId> [flags]
| Argument | Type | Description |
|---|
| <ruleId>required | string | The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| Flag | Type | Description |
|---|
| --direction <direction>required | string | up moves the rule one place earlier in the order, down one place later.One of: up, downExample: up
|
Example
sendmock outcome-rule sms move 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --direction up
Output with --json: SmsOutcomeRule[]. Exit codes: 0, 1, 2, 3.
- API
- POST
/api/v1/outcome-rules/sms/{ruleId}/move - MCP tool
sendmock_outcome_rule_move- In the app
- Settings > SMS > Custom outcome numbers > Move up, Move down
sendmock outcome-rule sms test
Which custom rule, magic number or profile decides a number's outcome.
sendmock outcome-rule sms test <number> [flags]
| Argument | Type | Description |
|---|
| <number>required | string | The number to test against the outcome rules and Twilio's magic numbers.Example: +15005550001 |
| Flag | Type | Description |
|---|
| --match-field <match-field>required | string | Whether the number is the message's recipient (to) or sender (from).One of: to, fromExample: to |
Example
sendmock outcome-rule sms test +15005550001 --match-field to
Output with --json: OutcomeTestResult. Exit codes: 0, 1, 2.
- API
- POST
/api/v1/outcome-rules/sms/test - MCP tool
sendmock_outcome_rule_test- In the app
- Settings > SMS > Test a number
sendmock outcome-rule sms update
Change an SMS outcome rule; send only the changed keys.
sendmock outcome-rule sms update <ruleId> [flags]
| Argument | Type | Description |
|---|
| <ruleId>required | string | The rule's ID, from the list of rules of the same kind.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| Flag | Type | Description |
|---|
| --match-field <match-field> | string | Match the pattern against the recipient (to) or the sender (from).One of: to, fromExample: to |
| --pattern <pattern> | string | Exact E.164 number, or * for any digits, e.g. +1555777*.Example: +1555777* |
| --outcome <outcome> | string | What happens to a matching message: reject (the send fails), undelivered, failed, delayed_delivery or read.One of: reject, undelivered, failed, delayed_delivery, readExample: undelivered |
| --error-code <error-code> | string | Required for reject, undelivered and failed.Example: 30003 |
| --delay-seconds <delay-seconds> | number | Required for delayed_delivery.Example: 30 |
| --note <note> | string | Why the rule exists, shown in the list.Example: Unreachable handset for the retry test |
| --enabled | boolean | Off rules are kept but skipped. --no-enabled sets it to false. |
Example
sendmock outcome-rule sms update 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --match-field to --pattern '+1555777*'
Output with --json: SmsOutcomeRule. Exit codes: 0, 1, 2, 3.
- API
- PATCH
/api/v1/outcome-rules/sms/{ruleId} - MCP tool
sendmock_outcome_rule_update- In the app
- Settings > SMS > Custom outcome numbers > Edit, enabled switch