Import an email
Converts existing markup into a NEW, fully EDITABLE Brew email design on the brand canvas. Brew preserves source structure and attempts to rehost every discoverable safe public resource. If rehosting fails, a validated public URL may be retained with a warning; private, malformed, and blocked references are stripped.
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 and subjectLine (the design-default inbox subject).
FREE — no model and no credits. Conversion is a deterministic compiler, so there is no token spend to meter and no credit gate. Normal request limits still apply: 5,000,000 UTF-8 bytes, 256 remote resources, 8 concurrent fetches, 10 MB per resource, and 50 MB aggregate downloads. Optional targetGroupId (grp_… or ungrouped) or targetGroupName (resolve-or-create) — not both; omit to land Ungrouped. Unknown targetGroupId → 404 EMAIL_GROUP_NOT_FOUND. Returns 201 with { emailId, emailVersionId, html, previewImage?, assetReport, group, subjectLine? }.
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 - 100The brand this request acts on. REQUIRED for organization-scoped credentials (otherwise 400 BRAND_ID_REQUIRED — there is no default brand); list ids with GET /v1/brands. Brand-scoped credentials may omit it, and sending a different brand returns 403 BRAND_SCOPE_MISMATCH. A brand outside your organization returns 404 BRAND_NOT_FOUND.
1 - 64Body
html, mjml, jsx 11 - 200Inbox subject line to set on the design (subjectLine — distinct from title, the canvas name). Sends still take an explicit per-send subject; this is the design's default, seeded into the send dialog and returned by GET /v1/emails?emailId=.
1 - 250Existing canvas group id (grp_…), or ungrouped. Mutually exclusive with targetGroupName.
1 - 64Resolve-or-create a group by this name. Mutually exclusive with targetGroupId.
1 - 60Response
The design was imported + persisted. Free — no model runs. emailVersionId pins the exact version for sends + automation nodes.