Sign inGet Started

Get an Apple Messages template version's language

GET
/v1/amb/templates/{template_ref}/versions/{version_id}/languages/{language}
const language = await bird.amb.templates.versions.languages.get(
  "bird_order_update",
  "amv_01ky4x8e4genzb7way45txfkm1",
  "en",
);
console.log(language.language, language.text);
Réponse200
{
  "language": "en",
  "text": {
    "body": "Your order {{ order_number }} is on its way."
  },
  "revision": 1,
  "content_hash": "sha256:3d948846f5f773fb7bed8ab81b57f3d0ff2cbff24cb549718f4d389f1ab0300a",
  "updated_at": "2026-09-10T09:00:00Z"
}

Returns one language's full text, revision, content hash, and update time. The response echoes the language in its canonical BCP-47 form.

Paramètres

template_refstring

The template's ID (amt_…) or slug.

version_idstring

The version that holds the language.

languagestring

The language as a BCP-47 tag. Case and separator differences are accepted and canonicalized.

Contenu de la réponse

language
string
obligatoire

The language in canonical BCP-47 form.

text
object

Stored text and files. Includes its {{ variable }} placeholders.

Afficher les attributs enfants
rich_link
object

Stored link preview. Includes its {{ variable }} placeholders.

Afficher les attributs enfants
rich_link.rich_link_data
object
obligatoire
Afficher les attributs enfants
rich_link.rich_link_data.url
string
obligatoire

HTTPS URL opened by the preview. A non-HTTPS URL is refused with a 422 AMBEndpointNotHTTPS. In a template it may contain {{ }} placeholders; the rendered value must be HTTPS.

rich_link.rich_link_data.title
string
obligatoire

Preview title.

rich_link.rich_link_data.assets
object
obligatoire
Afficher les attributs enfants
rich_link.rich_link_data.assets.image
object
obligatoire
Afficher les attributs enfants
rich_link.rich_link_data.assets.image.source_url
string
obligatoire

HTTPS URL of a PNG, JPEG, GIF or WebP preview image of up to 5 MiB and 6 megapixels, or 3 megapixels for a 16-bit PNG. It is fetched when the message is sent, converted to PNG and shrunk to Apple's 200 kB limit. Without layout, a PNG of 200 kB or less goes to Apple unchanged, so the pixel limit does not apply to it. An image over these limits, or one that cannot be converted, ends the message send_failed. It is checked before the first part and again on a retry, so an image that changes by then fails the message after the earlier parts arrived. A non-HTTPS URL is refused with a 422 AMBEndpointNotHTTPS. In a template it may contain {{ }} placeholders; the rendered value must be HTTPS.

rich_link.rich_link_data.assets.image.mime_type
string

Media type sent to Apple, which accepts only PNG. Defaults to image/png.

Value: image/png

rich_link.rich_link_data.assets.image.layout
string

How Apple displays a rich link's image. Apple picks the layout from the image's shape and width, so the image is resized or cropped to produce the one you choose:

  • icon shows a small image beside the title. The image is scaled to under 150 px wide. Use it for logos.
  • square shows a square image. The image is cropped to a square and sized to 240 px, or as small as 150 px when it needs to fit Apple's 200 kB limit.
  • large shows a wide image. A square or portrait image is cropped to a 2:1 rectangle, and a landscape image keeps its shape.

square enlarges an image whose shorter side is under 240 px, and large one narrower than 240 px, which can blur it. Omit layout to keep the image's own shape, so Apple picks the layout from its shape and width.

Possible values: icon, square, large

rich_link.rich_link_data.assets.video
object
Afficher les attributs enfants
interactive
object

Stored interaction. Includes its {{ variable }} placeholders.

Afficher les attributs enfants
revision
integer
obligatoire

This language's revision counter, used for concurrent-edit checks on draft writes.

content_hash
string
obligatoire

A fingerprint of Apple Messages template content, prefixed with its algorithm. Compare it within this API version to identify the exact source without transferring it.

updated_at
nullable string
obligatoire

When this language was last saved. Null for a built-in template.

Poursuivez avec la documentation, les guides et les exemples sur ce sujet.