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

CLI reference

The sendmock binary is also the client: every command talks to a running SendMock over HTTP. Each entry lists the arguments and flags, an example, the output and the same thing from the API and the MCP server (240 commands).

How commands take input

  • Every command runs one REST operation. Its path parameters are arguments in <>, and its body and query fields are flags: bounce_type is --bounce-type.
  • Switches: --read sets is_read to true, --no-read to false. Lists repeat the flag in the singular: --tag signup --tag qa. Objects take JSON.
  • The whole body can come from --data or --file; flags override its keys. A field that may be null can be left out.
  • Commands never prompt. Destructive ones need --yes, and --json is the default when the output is not a terminal, so scripts and agents read JSON.

Global flags

--json
Prints the answer as JSON; the default when the output is not a terminal.
--server <url>
The SendMock to talk to (SENDMOCK_SERVER, default http://127.0.0.1:8025).
--token <token>
The API token when auth is on (SENDMOCK_TOKEN).
--data <json>
The whole body as JSON; flags override its keys.
--file <path>
The whole body from a JSON or TOML file; - reads stdin.
--help
Prints the command's help with examples.

Exit codes

0
Done.
1
The request failed (invalid input, conflict, server error).
2
Usage error: an unknown flag, a missing argument or a value outside the allowed ones.
3
Not found.
4
Timed out waiting.
5
An assertion failed (scenarios).

Automation

Email

Forward rules

Email providers

Tag rules

Test helpers

System

HTTP Catcher

Logs

Numbers

Outcome rules

Checkout

Payments

Payment flows

Payment gateways

Payment methods

Projects

Push

Inbound routes

Seed

SMS

SMS providers

Verify

Webhook deliveries

Webhook endpoints

Webhook rules

Saved deliveries

Webhook templates

Webhook variables