Emails
Edit an email (prompt) OR restore a version
Flat-shape PATCH. Body is a union: { emailId, prompt, … } runs the AI edit lane (writes a new version: "latest"); { emailId, restoreVersion } non-destructively clones a historical version into a new latest. Both return the generated-email shape.
PATCH
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.
Required string length:
1 - 100Body
application/json