Sign inGet Started

List a version's languages

GET
/v1/whatsapp/templates/{template_ref}/versions/{version_id}/languages
const { data } = await bird.whatsapp.templates.versions.languages.list(
  "bird_otp",
  "wav_01ky4x8e4genzb7way45txfkm1",
);
for (const language of data) console.log(language.language, language.status);
Response200
{
  "data": [
    {
      "language": "pt-BR",
      "status": "approved",
      "revision": 4,
      "content_hash": "sha256:9f2c4e1a7b03d85fbc6e29d417a05e8c3b1d9f76a2e4c018d53b7f9a6c2e18d4",
      "next": [
        {
          "kind": "operation"
        }
      ]
    }
  ]
}

Returns every language a version holds, without content: each language's tag, what this version's submission did with it, its write counter, and a hash over its content. Compare the hashes to tell which languages actually differ before fetching any content. Fetch a single language for its content blocks.

Parameters

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.

Response Payload

data
array of object
required

Every language this version holds, without content.

Show child attributes
data.language
string
required

The canonical tag this language is addressed by.

data.status
string

What this version's submission did with this language. Absent on a draft.

Possible values (may grow over time): approved, pending, rejected, paused, disabled, in_appeal, pending_deletion, limit_exceeded, archived, deleted, submit_failed, outcome_unknown

data.revision
integer
required

This language's write counter, incremented every time its content changes.

data.content_hash
string
required

A hash over the serialized components this API surfaces, for telling whether a language differs without fetching it. It is comparable only within one version of this API: adding a field to the component shape changes every hash without the underlying content changing.

data.next
array of object

What to do next about this language, given the verdict it carries. 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.

Approval is per language, so this is where a rejection, a pause, or a reclaimed language is answered. The template's own next actions cannot say, because they read the aggregate.

Show child attributes

Continue with the documentation, guides and examples for this topic.