Upsert one language of a draft
/v1/email/templates/{template_ref}/versions/{version_id}/languages/{language}bird email templates versions languages set <template-ref> <version-id> <language> \
--html '<h1>Hi {{ bird.contact.first_name }}</h1>' \
--preview-text '{{ bird.contact.first_name }}, your order is on its way' \
--subject 'Welcome to Acme, {{ bird.contact.first_name }}!'curl -X PUT "https://us1.platform.bird.com/v1/email/templates/{template_ref}/versions/{version_id}/languages/{language}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"subject": "Welcome to Acme, {{ bird.contact.first_name }}!",
"preview_text": "{{ bird.contact.first_name }}, your order is on its way",
"html": "<h1>Hi {{ bird.contact.first_name }}</h1>"
}'{
"language": "en",
"revision": 4,
"authoring_mode": "html",
"draft_revision": 12,
"content_hash": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"updated_at": "2026-05-25T16:42:01Z",
"template_ref": "emt_01krdgeqcxet5s7t44vh8rt9mg",
"version_id": "emv_01krdgeqcxet5s7t44vh8rt9mg",
"compatibility_severity": "none",
"compatibility": []
}
Saves one language's content on the template's draft, creating that language if the draft does not have it yet and replacing it in full if it does. Send the same content twice and the draft ends up the same way, so a sync job or CI run needs one call rather than a create-or-edit decision.
Saving one language leaves every other language untouched, so a template with many languages can be edited a language at a time. Send the revision you last read to have a concurrent edit rejected with a 409 conflict_error instead of silently overwritten.
Only a draft can be saved: addressing a published version returns a 422 validation_error, because a published version never changes. A template holds at most 25 languages.
To link reusable blocks, send shared_blocks and place one HTML comment marker, bird:shared-block: followed by the binding's UUID, in html for each of its bindings, with an empty text and the revision read with authoring set to true. A language that already links blocks must be saved this way whenever its body changes. A language edited in the Bird dashboard's visual editor is changed in the dashboard, and this save returns a 422 validation_error for it.
Parameters
template_refstringThe template's id (emt_…) or slug. On read, a built-in system template's bird_ slug also resolves here. Writing or removing a language requires a workspace template, because a system template has no draft to edit and returns 404 not_found_error.
version_idstringThe version that holds the language.
languagestringThe language as a BCP-47 tag.
Request Payload
shared_blocksLinks reusable blocks into this language. Send the complete language with it: html with one HTML comment bird:shared-block:OCCURRENCE_UUID per binding, placed where a section can stand (between block-level elements, not inside a paragraph or a table row), empty text, and the revision you read (0 to create the language). Key each binding by a lowercase UUID for that occurrence. A newly linked block must be unarchived and published in this exact language. Keep an occurrence's UUID to move it, use a new one to add another, and delete both its marker and its binding to remove it. To remove every link, send HTML without markers and empty bindings. A language edited in the Bird dashboard's visual editor cannot be saved this way from outside the dashboard (E04108).
Show child parameters
shared_blocks.versionFormat of these shared section references.
shared_blocks.bindingsBlock references keyed by occurrence UUID, with up to 100 occurrences per language.
replace_custom_textConfirms replacing the language's custom plain-text body with text derived from the linked HTML, in the same save that links its first block. Requires shared_blocks and the language revision.
subjectThe email subject line. It may be empty in a draft but is required to publish.
preview_textThe line an inbox shows after the subject in the message list. Leave it out and the inbox shows the opening words of the body instead.
htmlThe HTML body for this language. On a language that links blocks, a save without shared_blocks is refused (E04109); read it with authoring=true for the HTML with its block markers first.
textThe plain-text body for this language. Omit it and a plain-text alternative is derived from the HTML when you submit.
revisionThe revision you last read for this language, to detect a concurrent edit. The save is rejected with a conflict if the language moved on since. Omit it to save unconditionally. Creating a language does not need one.
Response Payload
shared_blocksReusable block links in one template language, keyed by occurrence UUID. Each key matches one HTML comment marker bird:shared-block:UUID in the language's HTML. The template language selects the block language, and a link follows the block's latest publication in that language.
languageThe language that was saved, in its canonical form. Send a tag in any casing and this reports the form the template stores.
revisionThis language's new revision. Send it back on your next save of this language so a concurrent edit is caught instead of silently overwritten.
authoring_modeHow this language is edited, derived from what it stores. visual: it keeps a document from the Bird dashboard's visual editor. A request that would add, move or remove its linked blocks is refused, and so is one that would replace its body while it links blocks; open the template's editor_url instead. Subject and preview text stay editable. While it links no blocks, a full save without editor_state replaces its visual design with your HTML, and a partial update that changes html or text keeps the design, so the language stays visual and the visual editor still shows the design rather than your HTML. html: it is edited as HTML, and blocks are linked with HTML comment markers of the form bird:shared-block:OCCURRENCE_UUID and shared_blocks. It changes only when a save keeps or drops the visual editor's document.
Possible values (may grow over time): visual, html
draft_revisionThe draft's new revision. Saving a language moves it, so any template update you make next must send this value instead of the revision you read before the save.
content_hashA hash over the language's content as saved, prefixed with the algorithm that produced it (sha256:), so the algorithm can change without the field becoming ambiguous. It tells you whether a language differs without transferring the content, and is comparable only within one version of this API.
updated_atWhen this language was saved.
template_refThe template this save addressed.
version_idThe draft this save wrote to.
compatibility_severityThe worst severity across every finding the response was computed from, which
is the authoritative reading: a response that caps how many findings it lists
still accounts here for the ones it left out. Each response's compatibility
says which content it covered.
problem: at least one finding is aproblem.warning: every finding is awarning.none: there are no findings.
Possible values: problem, warning, none
nextWhat to do next with this save. Present on reads that compute it: an empty list means there is nothing to do, and the field is absent entirely on responses that do not report next actions.
A problem in compatibility routes back to this same write, with the identifiers
to address it already on this response; a warning says what degrades and leaves
the draft as it is.
compatibilityWhat the HTML you just saved uses that mail clients remove, ignore, or render inconsistently, in the order the patterns appear. Empty when nothing is worth reporting. Advisory: the language was saved either way, and a finding never refuses a write. Line and column count in the HTML as saved, which the language read returns as content.html. A partial update reports on the language in full rather than on the fields it carried, so it reads the same as the read of the same language. At most 200 findings come back, the first 200 in source order; compatibility_severity is derived from every finding the HTML produced, including any beyond those 200.
Related resources
Continue with the documentation, guides and examples for this topic.