A complete catalog of the headers Brew sets on API responses — what each one means, when it’s present, and how to consume it.Documentation Index
Fetch the complete documentation index at: https://docs.brew.new/llms.txt
Use this file to discover all available pages before exploring further.
Headers on every response
| Header | Example | Notes |
|---|---|---|
x-request-id | req_8cac13fd94e6420cacdd75a1aa403a28 | Opaque per-request correlator. Always include in support tickets — Brew engineers can trace your call through the full pipeline. |
Cache-Control | no-store | Brew responses are never cached; integrators should not cache them either. |
X-RateLimit-Limit | 100 | Requests allowed in the current rolling 60s window for this route + key. |
X-RateLimit-Remaining | 73 | Requests left before the window exhausts. Honor this to preemptively slow down. |
X-RateLimit-Reset | 1717891234 | Unix epoch seconds when the window resets. |
Headers on specific responses
| Header | When | Format |
|---|---|---|
Retry-After | 429 RATE_LIMITED | Integer seconds. Honor verbatim or take max(Retry-After, your-backoff). |
Deprecation | Legacy alias routes (e.g. /v1/events, /v1/executions, /v1/triggers/{id}) | true |
Sunset | Legacy alias routes | RFC 9745 timestamp, e.g. 2026-12-01T00:00:00Z |
Link | Legacy alias routes | </api/v1/automation/runs>; rel="successor-version" — points at the canonical successor |
Request headers Brew honors
Set these on requests when applicable:| Header | Purpose | See |
|---|---|---|
Authorization: Bearer brew_… | API key authentication (preferred) | Authentication |
X-API-Key: brew_… | API key authentication (alternative — pick one) | Authentication |
Idempotency-Key: <≤100 chars> | Replay-safe POST retries — same key + same body = cached response for 24h | Idempotency |
Content-Type: application/json | Required on POST / PATCH with a body |
Inspecting headers from clients
curl
-i (or -D -) prints the response headers above the body.
TypeScript SDK (raw mode)
{ raw: true } in RequestOptions on any SDK call to get the full BrewRawResponse<T> with the headers.
fetch
Header → action mapping
A typical agent / SDK consumes these headers like so:| Header | If you see… | Do |
|---|---|---|
X-RateLimit-Remaining | 0 or near 0 | Pause until X-RateLimit-Reset to avoid a 429. |
Retry-After | Anything (on 429) | Sleep that many seconds, then retry with the same Idempotency-Key. |
Deprecation: true | On a legacy route | Migrate to the URL in the Link: rel="successor-version" header before Sunset. |
Sunset | On a legacy route | Plan the migration; the alias stops working at that timestamp. |
x-request-id | Always | Log it; surface it on every customer-facing error. |
Casing
HTTP headers are case-insensitive. Brew emitsx-request-id lowercase, X-RateLimit-* and Retry-After in canonical case; fetch / SDKs read them case-insensitively.
See also
- Rate limits — the canonical
429cookbook. - Idempotency —
Idempotency-Keysemantics. - Errors — error envelope (the body that pairs with
429 RATE_LIMITED,409 IDEMPOTENCY_CONFLICT, etc.). - API introduction § Legacy aliases — the deprecated routes that still ship
Deprecation/Sunset/Link.
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.