Sign inGet Started

Get a reusable block language

GET
/v1/email/blocks/{block_id}/languages/{language}
// Requires email_management:read permission in the target workspace.
const draft = await bird.email.blocks.languages.get("ebl_01krdgeqcxet5s7t44vh8rt9mg", "en");
console.log(draft.authoring_mode, draft.revision, draft.fragment.fragment_html);
Reactie200
{
  "language": "en",
  "revision": 2,
  "authoring_mode": "html",
  "published_revision_id": "ebr_01krdgeqcxet5s7t44vh8rt9mg",
  "fragment": {
    "serializer_version": 2,
    "fragment_html": "<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody><tr><td lang=\"en\" style=\"font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 20px; letter-spacing: normal; text-align: left; text-transform: none; color: #333333; margin: 0; padding: 16px;\"><p style=\"margin: 0;\">Your disclosure text.</p></td></tr></tbody></table>"
  },
  "created_at": "2026-05-20T09:14:52Z",
  "updated_at": "2026-05-25T16:42:01Z"
}

Returns the draft section for the exact language requested, with the revision to send when saving or publishing it. A missing language returns a 404 not_found_error without falling back to another language. A section built in the Bird dashboard's visual editor has authoring_mode visual and is changed there.

Parameters

block_idstring

Block to read or edit.

languagestring

Exact block language as a BCP-47 tag. No fallback is applied.

Response Payload

language
string
verplicht

A language tag in BCP-47 form, for example en or pt-BR.

revision
integer
verplicht

Draft revision to send back when saving or publishing this language, as last returned. It is not a publication number; a published revision is a separate record numbered by version_number.

authoring_mode
string
verplicht

How this language is edited. html content is written as HTML and can be changed through the API, CLI and MCP. visual content is built in the Bird dashboard's visual editor; outside the dashboard, a visual section can still be copied by duplicating its block or restoring a published revision. The mode follows from the stored content and cannot be set directly. New values may be added; treat an unknown value as content you cannot edit through the API, CLI or MCP.

Possible values (may grow over time): visual, html

source_revision_id
string

Published source-language revision used for this translation. Omitted when untracked.

published_revision_id
string

Current published revision for this exact language. Omitted before publication.

fragment
object
verplicht

One self-contained email section. Version 2 is a section written as HTML and sends fragment_html alone; the API, SDKs, CLI and MCP write version 2. Version 1 is reserved for sections built in the Bird dashboard's visual editor, and only the dashboard saves it. A block language keeps the version it was created with.

Onderliggende attributen tonen
fragment.serializer_version
integer
verplicht

How this section is written. 2 is HTML written directly, and is the value to send from the API, SDKs, CLI and MCP. 1 is reserved for the Bird dashboard's visual editor; other callers get a 422 for it.

fragment.fragment_html
string
verplicht

Section HTML. Unfinished markup can be saved as a draft; validation checks readiness separately. A version 2 section is one presentation table with one tbody, tr and td, and all layout stays inside that cell. The cell sets lang to the block language and its own typography: font-family, a font-size in pixels, font-style, font-weight, line-height, letter-spacing, text-align (not start or end), text-transform, color, margin and padding. Root-relative units such as rem are refused; use px, em or percentages. Liquid stays balanced inside the cell, cannot use assign, capture, increment or decrement, and puts no control tag inside an attribute or style value. {{ bird.unsubscribe_url }} appears only as bare text or as the entire href of an <a>, and never inside an if !mso conditional comment, which Outlook skips. No document wrapper, <style>, script, form, class or id attribute. A table nested in the cell needs its own <tbody>. Inside a complete Outlook conditional comment, prefixed Office and VML elements such as v:fill may self-close, and a balanced if !mso conditional comment that shows its content outside Outlook is accepted when it holds no other conditional comment.

created_at
string
verplicht
updated_at
string
verplicht

Ga verder met de documentatie, handleidingen en voorbeelden voor dit onderwerp.