Templates

email_create_template

Create a template (react.email TSX, imports limited to react + @react-email/components, one default export) with a draft v1.

write email_create_template

Create a template (react.email TSX, imports limited to react + @react-email/components, one default export) with a draft v1. Category drives unsubscribe behavior: 'transactional' (receipts, resets — always delivered) vs 'lifecycle' (gets one-click unsubscribe headers). Use the COMPANY's brand from the project brief. For the 8 standard emails, pass starter to begin from a brand-filled baseline instead of authoring from scratch — then rewrite the copy in the company's voice. Then email_render_template to iterate.

Parameters

ParameterTypeRequiredDescription
slugstringYes
namestringYes
descriptionstringNo
categorytransactional | lifecycleNoOptional when starter is set (the starter's category applies).
topicstringNo
subjectstringNoSupports {{var}} interpolation. Optional when starter is set.
tsxSourcestringNoOptional when starter is set.
variablesobject[]No
starterwelcome | activation | magic-link | password-reset | order-confirmation | order-shipping | abandoned-cart | trial-ending | newsletter | promoNoBrand-filled baseline for a standard email. The project's brand kit (colors, logo, fonts, sign-off, footer) is baked in server-side; explicit subject/tsxSource/category/variables override the baseline. Edit the copy afterwards — it is a starting point, not a finished email.
projectIdstringNoTarget company (project id). Org-scoped tokens only; call email_list_projects first.

On this page