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
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | |
name | string | Yes | |
description | string | No | |
category | transactional | lifecycle | No | Optional when starter is set (the starter's category applies). |
topic | string | No | |
subject | string | No | Supports {{var}} interpolation. Optional when starter is set. |
tsxSource | string | No | Optional when starter is set. |
variables | object[] | No | |
starter | welcome | activation | magic-link | password-reset | order-confirmation | order-shipping | abandoned-cart | trial-ending | newsletter | promo | No | Brand-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. |
projectId | string | No | Target company (project id). Org-scoped tokens only; call email_list_projects first. |