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? }.
Request
- Base URLhttps://brew.new/api
- Auth
- HTTP bearer
- or API key in header X-API-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Optional idempotency key for safe retries. Reusing the same key with the same request body returns the original response for 24 hours.
Request body
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.
Changes
No recorded changes to this operation across all 1 revision of this API.