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.
Current Client Surface
The TypeScript SDK is resource-oriented.Resources And Methods
| Resource | Methods |
|---|---|
brew.audiences | list() |
brew.automations | create(), list(), get(), patch(), publish(), unpublish(), delete() |
brew.contacts | list(), listAll(), count(), getByEmail(), upsert(), upsertMany(), patch(), delete(), deleteMany() |
brew.domains | list() |
brew.emails | list(), generate(), edit() |
brew.events | fire() (deprecated alias — use brew.automationRuns.fire()) |
brew.automationRuns | fire(), test(), replay(), list(), get(), cancel() |
brew.fields | list(), create(), delete() |
brew.sends | create() |
brew.templates | list() |
brew.triggers | create(), list(), get(), patch(), delete() |
brew.triggers
and brew.automations do not expose AI authoring methods. AI body
generation is still available on brew.emails.generate({ emailType, prompt }); chain it with brew.automations.create({ … }) to
assemble automations programmatically.
There is no brew.brands resource. Brand management lives in the
Brew dashboard, and the single brand bound to your API key is the
only brand the SDK can act on.
Common Flow — Trigger → Emails → Automation → Publish → Fire
End-to-end deterministic recipe: create a custom trigger, mint each automation-typed email body in parallel, assemble the graph referencing thoseemailIds, publish, and fire. Every step returns
a typed result.
emailType on brew.emails.generate + brew.emails.list
brew.emails.generate({ emailType }) is required — the categorisation
controls canvas placement and downstream filtering:
emailType | Canvas board surface | Typical use |
|---|---|---|
campaign | Visible | One-shot sends to an audience / contact list. |
automation | Hidden | Bodies referenced by sendEmail nodes. |
transactional | Visible | System-triggered (welcome / receipt / reset). |
brew.emails.list({ emailType }) accepts the same enum as an
optional filter so you can list every automation-typed body the
brand has minted before authoring the next graph.
AutomationNodeInput — per-kind discriminated union
AutomationNodeInput is a discriminated union by type; setting
node.type narrows node.config automatically. The five node kinds
map 1:1 to the server-side Zod schemas:
node.type | node.config shape |
|---|---|
trigger | { triggerEventId? } |
sendEmail | { emailId, subject?, previewText?, fromAddress?, … } |
wait | { duration, unit: 'minutes' | 'hours' | 'days' | 'weeks' } |
filter | { logicalOperator, conditions[] } |
split | { mode: 'percentage' | 'condition', … } |
sendEmail node’s subject / previewText support
{{variable | fallback}} interpolation against the trigger payload.
Source Of Truth
The SDK follows the Brew OpenAPI contract. If you want the raw HTTP shape behind any method, use the API reference in this docs site.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.