Skip to main content
The localization API is a two-step flow: fetch your template’s translatable content, then update it with locale-specific strings. Courier stores translations at the block and channel level, so you can sync from a script, CI/CD pipeline, or translation management system. This tutorial walks through both steps using a welcome email (nt_01ABC) translated to French. For sending with locales, TMS webhooks, and the full endpoint reference, see Localization.

Fetch translatable content

Call GET /notifications/{id}/content to get every field you can translate:
The response has two arrays:
Save the id from each block and channel. You’ll pass them to the update endpoints. Use checksum to detect when default content changed and a translation needs re-syncing.

Update translations

Pick the endpoint that matches how much you’re updating:

One block

POST /notifications/{id}/blocks/{block_id}/locales Use this when syncing a single string from your database or TMS.

One channel

POST /notifications/{id}/channels/{channel_id}/locales Use this for email subjects or push titles. Pass a plain string per locale:

All blocks and channels

PUT /notifications/{id}/locales Use this for CI/CD jobs or full template syncs. Include every block and channel in one request. Channel values use an object ({ "subject": "..." } for email, { "title": "..." } for push):

One locale, all fields

PUT /notifications/{id}/locales/{locale} Same as bulk, but scoped to a single language. Use this when you’re adding French without touching existing German translations. All update endpoints return 204 No Content on success.
Preserve <variable> tags and their original id values in translated strings. Courier uses these for variable substitution.
For list blocks, pass an object with parent and children keys instead of a plain string. See Localization for all block formats.

Draft vs published paths

Every endpoint is available at two paths: Use the published paths for scripts and CI/CD. Use draft paths when you need a review step or TMS approval workflow. To publish draft changes:

What’s next

Translate with AI

Add locales and translate content in Design Studio without writing code.

Localization reference

Sending with locales, TMS webhooks, block types, and RTL support.