Skip to main content
Every API key is bound to exactly one brand. GET /v1/brand returns that brand plus its extraction readiness. Generating (POST /v1/emails) or sending against a brand that’s still extracting returns 422 BRAND_NOT_READY, so check ready first. Requires the emails scope. This is a singleton — there’s no list or id lookup.

Read the brand

curl "https://brew.new/api/v1/brand" \
  -H "Authorization: Bearer $BREW_API_KEY"
brand.ready is true only when status === 'completed'. A deleted brand returns 404 BRAND_NOT_FOUND (re-issue the key).

Gate generation on readiness

async function ensureBrandReady() {
  const { brand } = await brew.brand.get()
  if (!brand.ready) {
    throw new Error(`Brand is ${brand.status}; wait for extraction to finish.`)
  }
}

await ensureBrandReady()
await brew.emails.generate({ prompt: 'A spring launch announcement' })

See also

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.