v93

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01218121759.7 KB
Templates

Set template localization

Creates or replaces a caller-supplied localized template variant. The locale must be enabled for the company and cannot be its primary locale.

put/templates/{templateId}/localizations/{locale}

Path parameters

templateIdstring required

Template ID, transactional email ID, or transactional slug.

localestring required

Enabled non-primary locale code such as es or pt-BR.

Request body

subjectstring required

Localized email subject line.

previewTextstring nullable

Optional localized inbox preview text.

htmlstring

Localized raw HTML. Provide exactly one of html or blocks.

Example request

{
  "blocks": [
    {
      "id": "block_123",
      "type": "html",
      "content": "<h1>Hello</h1>",
      "styles": {
        "backgroundColor": "#f8fafc",
        "backgroundOpacity": 80,
        "textColor": "#111827",
        "borderRadius": 12,
        "borderColor": "#cbd5e1",
        "borderWidth": 1
      },
      "conditions": [
        {
          "id": "c1",
          "value": "plan:pro"
        }
      ]
    }
  ]
}

Response

Template localization saved

successboolean
templateIdstring
warningsstring[]

Non-blocking advisories about the blocks that were written. The write succeeded. Present when a field was not part of the block schema and was discarded, or when a supported field does not control what its name suggests for that block type - for example styles.backgroundColor on a button colors the band behind the button while the fill comes from buttonColor. Each message names the offending path and the fields that block does accept. A sequence email step update also reports the blocks the step's existing Style > Format added back on top of the submitted blocks, because the response echoes node config rather than the stored blocks. Absent when there is nothing to report.

Example response

{
  "success": true,
  "localization": {
    "locale": "es",
    "subject": "Bienvenido",
    "blocks": [
      {
        "id": "block_123",
        "type": "html",
        "content": "<h1>Hello</h1>",
        "styles": {
          "backgroundColor": "#f8fafc",
          "backgroundOpacity": 80,
          "textColor": "#111827",
          "borderRadius": 12,
          "borderColor": "#cbd5e1",
          "borderWidth": 1
        },
        "conditions": [
          {
            "id": "c1",
            "value": "plan:pro"
          }
        ]
      }
    ]
  },
  "warnings": [
    "blocks[0].styles.color is not a supported field and was ignored. Button label color comes from the block-level `buttonTextColor` field. Supported styles fields: backgroundColor, backgroundOpacity, bleed, borderColor, borderRadius, borderWidth, paddingBottom, paddingLeft, paddingRight, paddingTop, textAlign, textColor."
  ]
}