Skip to main content

Overview

Brew currently ships an official TypeScript SDK for the public API. It is a thin, typed wrapper over the same /api/v1 endpoints documented in the API reference. The SDK does not invent a second contract. It follows the OpenAPI source of truth. For the same coverage from a terminal, a script, or a CI job, see the Brew CLI. It wraps the same endpoints and ships as a Homebrew tap, an npm package, or a standalone binary.

Current SDK

What You Get

  • Typed request and response shapes.
  • One client with resource methods like brew.contacts.upsert(...).
  • Automatic retries for safe retry cases.
  • Auto-generated idempotency keys on POST.
  • Typed BrewApiError handling for non-2xx responses.
Every resource on the public API has a method, and every authenticated call resolves to the one brand bound to the API key. Resources lists each method with its notes. Graph and trigger authoring is deterministic: you supply the nodes, connections, and payload fields, and AI is scoped to email body generation through brew.emails.generate({ prompt }).

Other Languages

The TypeScript SDK is the only one Brew currently ships as a typed, versioned wrapper. For Python / Go / Ruby / Java / PHP / Swift / Kotlin / .NET, generate a client from the canonical OpenAPI 3.1 spec. See Generate your own SDK for the recommended generators and one-command scaffolds. The spec lives at:
  • https://brew.new/openapi/public-api-v1.yaml: served from the API host
  • https://docs.brew.new/api-reference/openapi-public-v1.yaml: served from this docs site
If you want REST directly (no codegen), every endpoint works fine with curl / httpx / fetch. See the cURL examples on every generated Public API v1 endpoint page.

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 explore it further with ChatGPT or Claude.