Sign inGet Started

Get a template version

GET
/v1/whatsapp/templates/{template_ref}/versions/{version_id}
const version = await bird.whatsapp.templates.versions.get(
  "bird_otp",
  "wav_01ky4x8e4genzb7way45txfkm1",
);
console.log(version.id, Object.keys(version.languages));
Resposta200
{
  "id": "wav_01krdgeqcxet5s7t44vh8rt9mg",
  "template_id": "wat_01krdgeqcxet5s7t44vh8rt9mg",
  "version_number": 4,
  "submitted_at": "2026-07-20T11:04:00Z",
  "variables": [
    {
      "type": "code"
    }
  ],
  "languages": {
    "en": {
      "status": "approved",
      "components": [
        {
          "type": "body",
          "text": "Your verification code is {{1}}.",
          "example_parameters": [
            {
              "type": "text",
              "text": "123456"
            }
          ]
        }
      ]
    }
  },
  "created_at": "2026-07-20T10:31:00Z"
}

Returns one version: the content of every language it holds and what its submission did with each.

Parâmetros

template_refstring

Template ID (wat_ prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.

version_idstring

ID of the template version (wav_ prefix), as returned by the version list.

Payload de resposta

id
string
obrigatório

Stable Bird identifier for the version.

template_id
string
obrigatório

The template this version belongs to.

version_number
nullable integer

The version's sequence number, assigned when it is submitted. Null on a draft, which has not been submitted and has no place in the sequence yet.

submitted_at
nullable string
obrigatório

When this version was submitted to Meta. Null on a draft, which has not been submitted, and null for a built-in template's version, which Bird ships already approved rather than submitting on your behalf.

variables
array of object

The variable slots this version's content fills in from the values you supply when sending. Combined across every language, because languages need not declare the same slots: if the English body uses first_name and the French one uses last_name, both appear here. A template with named parameters keys them by name; a positional one keys them by their {{n}} position, as 1, 2 and so on. Supply the slots the language you send declares, by these keys in template.parameters or through components.

Mostrar atributos secundários
variables.key
string
obrigatório

The key this slot is filled by. When system is true it is the reserved bird key or a dotted path beneath it, such as bird.contact.first_name, and naming it in a send is rejected. Otherwise, on email and SMS it is the key you set in the send's parameters object, and on WhatsApp the key in the send's template.parameters, or the name on the matching parameter inside components. A WhatsApp template whose placeholders are positional uses the position itself as 1, 2 and so on, and values with no placeholder use fixed keys: header_url, header_filename, header_location and code, plus button_url (or button_url_1, button_url_2 for a carousel card) for a url button whose suffix is numbered.

variables.type
string
obrigatório

The value type this slot accepts. Each typed slot rejects a value that does not match its constraint. Built-in SMS templates use typed slots (code, amount and the rest); domain is a lowercase DNS domain name such as example.com, which the verification templates fill to bind a passcode to a website, and app_hash is an 11-character Android SMS Retriever app hash such as FA+9qCX9VSu, which they fill to bind it to an Android app. Apple Messages templates type a variable from its content: the field it fills (url, image, timestamp, location, timezone) or the formatting filter applied to it (date, date_time, amount, currency). Email and workspace SMS templates use text. WhatsApp templates use text, plus url for a media header's file and location for a location header. A location value is an object with latitude and longitude, and optionally name and address. On Apple Messages, name becomes the location's title and address is not shown. Workspace SMS parameters must be scalar values.

Possible values (may grow over time): code, ttl, count, ref, date, date_time, amount, currency, domain, app_hash, url, image, timestamp, timezone, location, text

variables.required
boolean
obrigatório

Whether the send must supply this variable. Omitting a required value returns 422 on every channel. On Apple Messages, a later time slot's start that is used nowhere else is optional: a send that omits it drops that slot. Always false when system is true, because you do not supply that slot's value.

variables.constraint
string
obrigatório

A plain-language description of what values this variable accepts. When system is true it names where Bird takes the value from instead, because there is no value for you to send.

variables.sensitive
boolean

Whether this slot requires redacted message history. Published email template sends that store recipient snapshots reject sensitive inputs before acceptance. Other channels retain their own sensitive-input delivery and retention rules.

variables.system
boolean

Whether the value comes from Bird rather than from the send. Absent means false. System slots are identified by the reserved bird key or a dotted path beneath it. They appear on email templates, and on WhatsApp templates whose parameter bindings read contact data; every SMS slot is yours to fill. A draft can also name a reserved key no Bird value fills, including bird itself: constraint says so, and publishing that draft is rejected.

languages
object
obrigatório

This version's content, keyed by BCP-47 language tag, with what its submission did with each language.

created_at
nullable string
obrigatório

When the version was opened. Null for a built-in template's version, which Bird ships rather than stores.