Generate an email design
Generates a new design through the Brew email agent. Emails are pure DESIGNS in the decoupled model — no send state, no type. Sending happens later — POST /v1/sends delivers the design to a target (a saved audience, an inline list, or a single address) via a verified domain (or fires a one-off test with test: true), or a sendEmail node in an automation graph references the returned emailId + emailVersionId.
Returns 201 with { emailId, emailVersionId, html, previewImage? } when a design was persisted, or 200 with { response } when the agent answered in prose without writing a design. Supports Idempotency-Key for safe retries.
Authorizations
Send your Brew API key as Authorization: Bearer brew_xxx.
Headers
Optional idempotency key for safe retries. Reusing the same key with the same request body returns the original response for 24 hours.
1 - 100Body
Generation prompt plus optional source URLs / reference design. The brand is resolved from the API key and must not be passed.
Response
The agent answered in prose without writing a design ({ response }).
1