Skip to main content
Commands follow a brew-cli <resource> <action> shape and cover every operation in Public API v1. Run any command with --help for flags and examples. The generated reference lists the complete command surface.

Everyday Commands

The ten you will reach for most:
For complete worked sequences (sending an email, building a welcome automation, QA before a big send), see Common Flows.

The Surface

Conventions Every Command Shares

  • Two output modes. Human-readable in a terminal; exact API JSON when you pass --json or pipe the output. Data goes to stdout, progress to stderr, so pipes stay clean.
  • Structured inputs. Simple values are flags. Full request bodies go through --input '<json>' (or --input - to read stdin), and file uploads through --file <path>. Flags win over --input on conflicts, even an explicit empty one, so "" clears a description or sender name. The id in the command line always wins over ids inside a body.
  • Unknown input keys fail. --input refuses a top-level key the command wouldn’t send. It exits 2 with a usage error that names the key, suggests a close match (firstname → firstName), and lists the accepted keys. Inputs whose keys are your own data, such as a bare trigger payload or flat contact fields, aren’t checked.
  • Safe by default. Irreversible commands (production sends, deletes, trigger fires) ask for confirmation in a terminal and refuse with exit code 4 anywhere else until you pass --yes. Test sends (emails send --test) skip the gate.
  • Bounded and interruptible. --timeout <duration> caps a whole command, response body included, and --max-retries <n> controls retries on SDK-backed requests. Raw transport commands make one attempt. Ctrl-C stops a request wherever it is and exits 130. Errors include an idempotencyKey and retryCommand when the request can be replayed. Follow the returned command; image-upload recovery replays only finalization.
  • Retry-safe writes. Pass --idempotency-key where the command supports it to make retries replay instead of duplicate.
  • Pagination handled. Paginated commands expose --limit, --cursor, and --all where supported. --all follows the cursor and combines the pages.
  • Typed errors. Failures print the API’s error envelope with its stable code and the requestId for support.

The Escape Hatch

brew-cli api <method> <path> sends a raw authenticated request with your key, brand header, and error handling applied:
Useful for brand-new endpoints, unusual query combinations, or exploring the API interactively. Mutating methods go through the same confirmation gate as every other command.

Discovery

  • brew-cli docs: pointers to this documentation, the OpenAPI spec, and the agent guide.
  • brew-cli docs api: the live machine-readable API catalog (GET /v1/help).
  • brew-cli docs --agent: a JSON manifest of every command, flag, and safety class, built for AI agents.

Need Help?

Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:

Search Documentation

Type in the “Ask any question” search bar at the top left to instantly find relevant documentation pages.

Ask ChatGPT or Claude

Click here to open the Copy page menu at the top of this page, then send the page to ChatGPT, Claude, or your editor.