Import an email
Converts existing markup into a NEW, fully EDITABLE Brew email design on the brand canvas. Brew rebuilds the markup into a clean, fully editable design, and EVERY external image is fetched, optimized, and RE-HOSTED on the Brew CDN (no hot-linking third-party assets).
content is the raw markup as a STRING; format describes what you supply: html (an HTML email document or fragment), mjml (MJML markup), or jsx (React-Email JSX) — all converted into a clean, editable design. Pass baseUrl to resolve relative image paths. Optional title.
USAGE-metered: the agent’s actual token in/out is billed (no fixed price, no X-Credit-Cost header). The call gates on a non-empty credit balance. Returns 201 with the SAME shape as POST /v1/emails: { emailId, emailVersionId, html, previewImage? }.
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
Response
The design was imported + persisted. Usage-metered: the agent’s actual token usage is charged. emailVersionId pins the exact version for sends + automation nodes.