Skip to main content

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.
import { createBrewClient } from '@brew.new/sdk'

const brew = createBrewClient({
  apiKey: process.env.BREW_API_KEY!,
})

Resources And Methods

ResourceMethods
brew.audienceslist()
brew.contactslist(), listAll(), count(), getByEmail(), upsert(), upsertMany(), patch(), delete(), deleteMany()
brew.domainslist()
brew.emailslist(), generate()
brew.fieldslist(), create(), delete()
brew.sendscreate()
brew.templateslist()
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

const { templates } = await brew.templates.list()
const { domains } = await brew.domains.list()

const generated = await brew.emails.generate({
  prompt: 'Create a welcome email',
  referenceEmailId: templates[0]?.emailId,
})

if ('emailId' in generated) {
  await brew.sends.create({
    emailId: generated.emailId,
    domainId: domains[0]!.domainId,
    subject: 'Welcome to Brew',
    emails: ['user@example.com'],
  })
}

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:

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.