List a version's languages
/v1/whatsapp/templates/{template_ref}/versions/{version_id}/languagesconst { data } = await bird.whatsapp.templates.versions.languages.list(
"bird_otp",
"wav_01ky4x8e4genzb7way45txfkm1",
);
for (const language of data) console.log(language.language, language.status);languages = client.whatsapp.templates.versions.languages.list(
"bird_otp", "wav_01ky4x8e4genzb7way45txfkm1"
)
for language in languages.data:
print(language.language, language.status)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)
}$languages = $bird->whatsapp->templates->versions->languages->list('bird_otp', 'wav_01ky4x8e4genzb7way45txfkm1');
foreach ($languages->getData() ?? [] as $language) {
echo $language->getLanguage(), ' ', $language->getStatus(), "\n";
}bird whatsapp templates versions languages list <template-ref> <version-id>curl -X GET "https://us1.platform.bird.com/v1/whatsapp/templates/{template_ref}/versions/{version_id}/languages" \
-H "Authorization: Bearer $TOKEN"{
"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_refstringTemplate ID (wat_ prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.
version_idstringID of the template version (wav_ prefix), as returned by the version list.
Response Payload
dataEvery language this version holds, without content.
Show child attributes
data.languageThe canonical tag this language is addressed by.
data.statusWhat 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.revisionThis language's write counter, incremented every time its content changes.
data.content_hashA 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.nextWhat 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
data.next.kindWhat you do about this step.
operation: call the operation named inoperation, 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.descriptionA short, human-readable label for the step, suitable for display.
data.next.operationThe 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.paramsThe 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.urlA 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
Continue with the documentation, guides and examples for this topic.