Templates
email_update_template
Create a NEW draft version of a template (published versions are immutable).
write email_update_template
Create a NEW draft version of a template (published versions are immutable). Omitted fields carry over from the latest version. Also updates template metadata (name/category/sender) when given.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | |
subject | string | No | |
tsxSource | string | No | |
variables | object[] | No | |
name | string | No | |
category | transactional | lifecycle | No | |
topic | string | null | No | |
variantKey | string | No | Set for A/B variants (e.g. 'b'); omit for the mainline. |
locale | string | No | |
projectId | string | No | Target company (project id). Org-scoped tokens only; call email_list_projects first. |
create_templatewrite
Create a template (react.email TSX, imports limited to react + @react-email/components, one default export) with a draft v1.
restyle_templatewrite
Re-skin a template to the company's CURRENT brand kit as a new draft version — colors, fonts, logo, sign-off, and footer all refresh at once.