Update one language of a draft
/v1/email/templates/{template_ref}/versions/{version_id}/languages/{language}bird email templates versions languages update <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 PATCH "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": []
}
Changes part of one language's content on the template's draft: send only the fields you are changing and the rest keep their current values. Use this to fix a subject line without resending a megabyte of HTML.
The language must already exist on the draft. A language it does not have returns a 404 not_found_error. Save the language's full content instead to create it.
Send the revision you last read to have a concurrent edit rejected with a 409 conflict_error. Only a draft can be edited. Addressing a published version returns a 422 validation_error.
On a language that links reusable blocks, send the revision and change only subject or preview_text here. Changing its body takes a full save with its shared_blocks.
参数
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.
请求载荷
subjectThe email subject line. It may be empty in a draft but is required to publish.
preview_textA new line for the inbox to show after the subject in the message list. Send null to clear it, and the inbox shows the opening words of the body instead.
htmlA new HTML body for this language. Refused on a language that links blocks; change its body with a full save that includes shared_blocks.
textA new plain-text body for this language. Send null to clear it, and a plain-text alternative is derived from the HTML when you submit. Refused on a language that links blocks, which always derives its text.
revisionThe revision you last read for this language, to detect a concurrent edit. The edit is rejected with a conflict if the language moved on since. Omit it to apply the edit unconditionally.
响应载荷
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.