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);
Antwort200
{
  "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.

Parameter

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.

Antwort-Payload

language
string
erforderlich

The language in canonical BCP-47 form.

text
object

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

Untergeordnete Attribute anzeigen
rich_link
object

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

Untergeordnete Attribute anzeigen
rich_link.rich_link_data
object
erforderlich
Untergeordnete Attribute anzeigen
rich_link.rich_link_data.url
string
erforderlich

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
erforderlich

Preview title.

rich_link.rich_link_data.assets
object
erforderlich
Untergeordnete Attribute anzeigen
rich_link.rich_link_data.assets.image
object
erforderlich
Untergeordnete Attribute anzeigen
rich_link.rich_link_data.assets.image.source_url
string
erforderlich

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
Untergeordnete Attribute anzeigen
interactive
object

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

Untergeordnete Attribute anzeigen
revision
integer
erforderlich

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

content_hash
string
erforderlich

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
erforderlich

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

Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.