Brew rate-limits every public v1 endpoint to keep the platform fast and fair. Limits are per API key, per route, per rolling 60-second window, surfaced on every response, and recoverable via standardDocumentation Index
Fetch the complete documentation index at: https://docs.brew.new/llms.txt
Use this file to discover all available pages before exploring further.
Retry-After semantics.
Headers (on every response)
Every successful AND failed response — not just 429s — carries the same three headers so you can preemptively slow down before a window exhausts:429 RATE_LIMITED additionally sets:
Retry-After is the wall-clock seconds to wait. SDKs and clients should honor it verbatim; if you need a longer back-off, take the max of Retry-After and your own exponential value.
Per-route policies
Each route declares a named policy inlib/api/rate_limit/policy.ts. The same key the policy uses appears in the error.code and on observability dashboards, so you can correlate.
| Policy | Per-min limit | Routes |
|---|---|---|
triggers.read | 100 | GET /v1/triggers |
triggers.write | 60 | POST/PATCH/DELETE /v1/triggers |
automations.read | 100 | GET /v1/automations |
automations.write | 60 | POST/PATCH/DELETE /v1/automations |
automation.runs.read | 100 | GET /v1/automation/runs (and the legacy /v1/executions alias) |
automation.runs.write | 60 | POST/PATCH /v1/automation/runs (and the legacy /v1/executions alias) |
emails.read | 100 | GET /v1/emails |
emails.generate | 20 | POST /v1/emails |
emails.edit | 20 | PATCH /v1/emails |
sends.write | 10 | POST /v1/sends |
contacts.read | 100 | GET /v1/contacts |
contacts.write_single | 100 | POST/PATCH/DELETE /v1/contacts with a single-row body |
contacts.write_batch | 10 | POST/DELETE /v1/contacts with a batch body |
audiences.read | 100 | GET /v1/audiences |
domains.read | 100 | GET /v1/domains |
fields.read | 100 | GET /v1/fields |
fields.write | 100 | POST/DELETE /v1/fields |
templates.read | 100 | GET /v1/templates |
Session traffic — 300/min ceiling
UI-backed session traffic (dashboard, Brew chat orchestrator) gets a flat 300/min ceiling across every policy above so a busy operator never blocks themselves while editing. API-key traffic uses the strict per-route limits in the table.
Generosity & burst behaviour
- The window is a rolling 60 seconds, not a fixed wall-clock minute. A spike at the top of a minute does NOT get a free second budget.
- The store uses Redis sorted-sets (when available); when Redis is unavailable, every endpoint fails open with
X-RateLimit-Remaining: <limit>andX-RateLimit-Reset: now+60. You will not see spurious 429s during a Redis blip. - Test mode bypass:
BREW_DISABLE_API_RATE_LIMIT=1on the dev server skips the gate entirely (test-only env var; never set in production).
429 recovery cookbook
The canonical retry loop:
- Always honor
Retry-After. Take the max ofRetry-Afterand your own back-off so you don’t out-aggressive yourself. - Reuse the same
Idempotency-Keyon every retry. The first successful response is cached for 24h and your retries get the original payload back instead of double-firing — see Idempotency. - Preemptively pause when
X-RateLimit-Remaininghits 0. The header ships on every response, so a well-behaved client can throttle itself before a 429 ever fires.
429 RATE_LIMITED error envelope
error.retryAfter mirrors the Retry-After header for clients that don’t read response headers.
Server-side observability
Every rate-limited response logs a structured warning with the policy name, the API key id, and the remaining count. If you see persistent 429s in production that don’t match your expected QPS, contact support with thex-request-id from any 429 response — we can look up the per-key window state and diagnose.
See also
- Idempotency — pair with
Idempotency-Keyso retries are safe. - Errors — full error envelope + every
error.code. - Response headers — every header Brew sets.
- Async jobs & polling — for
POST /v1/sendsandPOST /v1/automation/runs, you don’t need to call the API again to wait for delivery — poll the run.
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:- Self-Service Tools
- Talk to Our Team
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 analyze documentation with ChatGPT or Claude for deeper insights.