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 its flags and a runnable example, or browse the generated reference for the whole surface at once.

Everyday Commands

The ten you will reach for most:
For complete worked sequences (launching a campaign, 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, and the id in the command line always wins over ids inside a body.
  • Safe by default. Irreversible commands (campaign 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.
  • Retry-safe writes. Pass --idempotency-key on any create to make retries replay instead of duplicate.
  • Pagination handled. List commands take --limit and --cursor, and --all follows the cursor to return every page as one result.
  • 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.

ChatGPT/Claude Integration

Click “Open in ChatGPT” at the top right of any page to explore it further with ChatGPT or Claude.