Templates
email_add_translation
Add a locale translation of a template as a new draft version.
write email_add_translation
Add a locale translation of a template as a new draft version. The send path delivers each contact the version matching their locale attribute, falling back to the base language when a translation is missing. Translate the copy in the company's voice (don't machine-translate blind — keep subjects short per language). Publish it like any version; a translation never becomes the template's base 'current' version.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | |
locale | string | Yes | Target locale, e.g. 'fr', 'es', 'pt-BR'. |
subject | string | Yes | Translated subject (supports {{var}}). |
tsxSource | string | Yes | Translated TSX — start from email_get_template on the base version and translate the copy, keeping structure/variables identical. |
variables | object[] | No | |
projectId | string | No | Target company (project id). Org-scoped tokens only; call email_list_projects first. |