curl --request POST \
--url https://brew.new/api/v1/emails/figma \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"figmaUrl": "https://www.figma.com/design/abc123/Launch-email?node-id=1-2",
"title": "Launch email",
"format": "jsx"
}
'{
"emailId": "dP4xLm9Nq2Rs7Tv1WbYzK",
"emailVersionId": "Tv1WbYzKdP4xLm9Nq2Rs7",
"title": "Launch email",
"format": "jsx",
"content": "<Html><Body><Container><Heading>Launch day</Heading></Container></Body></Html>",
"warningCount": 0,
"exportedNodeCount": 2,
"previewImage": "https://cdn.brew.new/p/dP4xLm9Nq2Rs7Tv1WbYzK.png",
"group": null
}Import a Figma frame
Deterministically converts one selected Figma frame into a new editable Brew email design. No model runs and no credits are charged.
figmaUrl must be a Figma frame link containing node-id. The API-key brand must already have Figma connected in Brew Integrations, and that connected account must be able to read the file.
Set format to jsx (default) for React Email JSX or html for rendered email HTML. The requested representation is returned in content; the persisted design is identified by emailId and emailVersionId. Optional groupId (grp_… or ungrouped) or groupName (resolve-or-create) — not both; omit to land Ungrouped. Unknown groupId → 404 EMAIL_GROUP_NOT_FOUND.
curl --request POST \
--url https://brew.new/api/v1/emails/figma \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"figmaUrl": "https://www.figma.com/design/abc123/Launch-email?node-id=1-2",
"title": "Launch email",
"format": "jsx"
}
'{
"emailId": "dP4xLm9Nq2Rs7Tv1WbYzK",
"emailVersionId": "Tv1WbYzKdP4xLm9Nq2Rs7",
"title": "Launch email",
"format": "jsx",
"content": "<Html><Body><Container><Heading>Launch day</Heading></Container></Body></Html>",
"warningCount": 0,
"exportedNodeCount": 2,
"previewImage": "https://cdn.brew.new/p/dP4xLm9Nq2Rs7Tv1WbYzK.png",
"group": null
}Authorizations
Headers
The 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
Response
The converted design was persisted and the requested source representation is returned in content.
Was this page helpful?