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

ParameterTypeRequiredDescription
slugstringYes
localestringYesTarget locale, e.g. 'fr', 'es', 'pt-BR'.
subjectstringYesTranslated subject (supports {{var}}).
tsxSourcestringYesTranslated TSX — start from email_get_template on the base version and translate the copy, keeping structure/variables identical.
variablesobject[]No
projectIdstringNoTarget company (project id). Org-scoped tokens only; call email_list_projects first.

On this page