# List a version's languages

`GET /v1/whatsapp/templates/{template_ref}/versions/{version_id}/languages`

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](/docs/api/reference/get-whatsapp-template-version-language) for its content blocks.

## Code samples

### TypeScript

```ts
const { data } = await bird.whatsapp.templates.versions.languages.list(
  "bird_otp",
  "wav_01ky4x8e4genzb7way45txfkm1",
);
for (const language of data) console.log(language.language, language.status);
```

### Python

```py
languages = client.whatsapp.templates.versions.languages.list(
    "bird_otp", "wav_01ky4x8e4genzb7way45txfkm1"
)
for language in languages.data:
    print(language.language, language.status)
```

### Go

```go
languages, err := client.Whatsapp.Templates.Versions.Languages.List(context.Background(), "bird_otp", "wav_01ky4x8e4genzb7way45txfkm1")
if err != nil {
	log.Fatal(err)
}
for _, l := range languages.Data {
	fmt.Println(l.Language, l.Revision)
}
```

### PHP

```php
$languages = $bird->whatsapp->templates->versions->languages->list('bird_otp', 'wav_01ky4x8e4genzb7way45txfkm1');
foreach ($languages->getData() ?? [] as $language) {
    echo $language->getLanguage(), ' ', $language->getStatus(), "\n";
}
```

### CLI

```sh
bird whatsapp templates versions languages list <template-ref> <version-id>
```

### cURL

```sh
curl -X GET "https://us1.platform.bird.com/v1/whatsapp/templates/{template_ref}/versions/{version_id}/languages" \
  -H "Authorization: Bearer $TOKEN"
```

## Example response `200`

```json
{
  "data": [
    {
      "language": "pt-BR",
      "status": "approved",
      "revision": 4,
      "content_hash": "sha256:9f2c4e1a7b03d85fbc6e29d417a05e8c3b1d9f76a2e4c018d53b7f9a6c2e18d4",
      "next": [
        {
          "kind": "operation"
        }
      ]
    }
  ]
}
```

## Path parameters

- `template_ref` (string): 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_id` (string): ID of the template version (`wav_` prefix), as returned by the version list.

## Response body

- `data` (array of object, required): Every language this version holds, without content.
- `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.
- `data.next.kind` (string, required)

  What you do about this step.

  - `operation`: call the operation named in `operation`, then
    read again.
  - `external`: act somewhere this API does not reach, then read
    again.
  - `wait`: nothing is asked of you, so read again later.
  - `terminal`: nothing you do resolves this, so stop retrying.

  Tolerate a value you do not recognize: show the `description` and
  offer no action.

  Possible values (may grow over time): `operation`, `external`, `wait`, `terminal`
- `data.next.description` (string, required): A short, human-readable label for the step, suitable for display.
- `data.next.operation` (string): The operationId to call. Present only when `kind` is `operation`. The operation's own schema says how to call it; this says only which one, and what to address it with.
- `data.next.params` (object): The parameters that address the operation, by name: `{"sender_id": "…"}` for an operation on `/v1/sms/senders/{sender_id}/requirements`. A parameter the operation takes in its query string is given the same way, so an operation addressed as `?subject_id=` carries `{"subject_id": "…"}`. Every parameter the call needs is here, whether its value came from the thing you were acting on or is fixed for this step, so you can make the call from this object alone. Present only when `kind` is `operation` and the operation names a subject. A request body, when the operation takes one, is described by the operation's own schema and never appears here.
- `data.next.url` (string): A URL to open. Present only when `kind` is `external`, and only when the step has one. An external step whose `description` says to go and do something with no URL to open is normal.

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
