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.
Overview
Brew Public API v1 gives you programmatic access to the same core flows that power the product. Use it to:- Manage contacts and contact fields.
- List saved audiences.
- List verified sending domains.
- Generate and list emails.
- List public templates.
- Start send jobs for saved emails.
Base URL
/v1 prefix.
Authentication
Every request needs a Brew API key. Create and manage keys at brew.new/settings/api. You can send it in either header:Brand Scoping
Every API key is bound to exactly one brand at creation time. The brand is resolved from the key on every request — no public endpoint accepts abrandId field in its request body or query string. To
operate on a different brand, switch brands in the dashboard at
brew.new/settings/api and create a
new key for that brand.
| Scope | Endpoints | Behavior |
|---|---|---|
| Brand-scoped (filtered to the key brand automatically) | GET/POST/PATCH/DELETE /v1/contacts, GET/POST/DELETE /v1/fields, GET /v1/audiences, GET /v1/domains, GET/POST /v1/emails, PATCH /v1/emails/{emailId}, POST /v1/sends | Reads filter to the key brand. Mutations write only to the key brand. Cross-brand emailId / audienceId references on PATCH /v1/emails/{emailId} and POST /v1/sends surface as 404 (not 403) so the API never confirms the existence of resources in another brand. |
| Organization-wide (not constrained to a brand) | GET /v1/templates | Returns the public template catalog. |
brandId field — body or query — to any /v1/*
endpoint, the request fails with 400 INVALID_REQUEST and
param: "brandId". Strip the field; the brand always comes from the
key.
Brands themselves are managed only in the Brew dashboard. The public
API does not expose endpoints to create, list, or update brands.
Permission Scopes
Each API key carries a list of permission scopes. The dashboard defaults new keys toall. Routes require either the listed scope
or all:
| Permission | Endpoints |
|---|---|
contacts | GET /v1/contacts, POST /v1/contacts, PATCH /v1/contacts, DELETE /v1/contacts, GET /v1/fields, POST /v1/fields, DELETE /v1/fields, GET /v1/audiences |
emails | GET /v1/domains, GET /v1/emails, POST /v1/emails, GET /v1/templates, POST /v1/sends |
all | every endpoint above |
403 INSUFFICIENT_PERMISSIONS with the missing scope name in
the error envelope’s param field.
Quick Start
Get an API key
Go to brew.new/settings/api and
create a key. The key is bound to whatever brand is active in the
dashboard at creation time — switch brands first if you want a key
for a different brand.
How The API Fits Together
Think about the API in four parts.Recipient Data
GET /v1/contactsPOST /v1/contactsPATCH /v1/contactsDELETE /v1/contactsGET /v1/fieldsPOST /v1/fieldsDELETE /v1/fieldsGET /v1/audiences
Sender Identity
GET /v1/domains
Email Creation
GET /v1/emailsPOST /v1/emailsGET /v1/templates
Delivery
POST /v1/sends
runId.
Current Public v1 Surface
| Method | Endpoint | Purpose |
|---|---|---|
GET | /v1/contacts | List contacts, count contacts, or look up one contact by email |
POST | /v1/contacts | Upsert one or many contacts |
PATCH | /v1/contacts | Patch a contact |
DELETE | /v1/contacts | Delete one or many contacts |
GET | /v1/fields | List contact fields |
POST | /v1/fields | Create a contact field |
DELETE | /v1/fields | Delete a contact field |
GET | /v1/audiences | List saved audiences |
GET | /v1/domains | List verified sending domains |
GET | /v1/emails | List latest saved emails |
POST | /v1/emails | Generate a new email |
PATCH | /v1/emails/{emailId} | Edit a saved email; persists a fresh version: "latest" row and demotes the previous head |
GET | /v1/templates | List public templates |
POST | /v1/sends | Start a send job |
Idempotency
POST endpoints support idempotency with theIdempotency-Key header.
PATCH /v1/emails/{emailId} also accepts an Idempotency-Key for
safe edit replays (the SDK does not auto-generate one for PATCH;
callers opt in by passing the header).
Use it on:
POST /v1/contactsPOST /v1/fieldsPOST /v1/emailsPATCH /v1/emails/{emailId}POST /v1/sends
Rate Limits And Debugging Headers
Successful responses include helpful headers:x-request-idX-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
x-request-id.
TypeScript SDK
If you prefer typed wrappers over raw HTTP, Brew also ships an official TypeScript SDK.TypeScript SDK
Use
@brew.new/sdk for typed requests, retries, idempotency, and a
resource-oriented client surface.Public API v1 Reference
Browse the generated endpoint pages from the current OpenAPI spec.
What To Read Next
Public API v1
Browse every generated endpoint page from the current OpenAPI spec.
SDK Overview
Start with the official TypeScript SDK.
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.