Sign inGet started

bird whatsapp templates versions languages set

Usage

Codevoorbeeld
bird whatsapp templates versions languages set <template-ref> <version-id> <language> [flags]

Description

Write one language of a WhatsApp template's draft
This replaces the language, it does not merge: send its complete content every time. Only the draft is writable. A submitted version is immutable, and a language under review at WhatsApp refuses the write until that review finishes. "bird whatsapp templates get <slug>" reports the draft's id in "draft_version_id"; "bird whatsapp templates versions create" opens one if there is none.
Content goes in through --body-file: "components" is an array of blocks, each carrying nested arrays of its own, a shape no flag can express. A body block is required before the language can be submitted, and every variable in a block needs an example value, which is what WhatsApp reviews against.
Nothing here reaches WhatsApp. Submit the draft once every language is ready.
Build the request from flags, a JSON WhatsAppTemplateLanguageUpsert body via --body-file ("-" reads stdin), or both — a flag overrides the matching body field. Run --example to print a ready-to-edit body, or --dry-run to print the resolved request without sending it.

Procedure

Step 4 of 7 of "Author a WhatsApp template and get it approved". Previous: bird whatsapp templates versions create. Next: bird whatsapp templates versions submit.

Examples

Codevoorbeeld
# print the body shape (no credentials needed)
bird whatsapp templates versions languages set --example

# the body it prints:
Codevoorbeeld
{
  "components": [
    {
      "code_expiration_minutes": 60,
      "text": "Your order {{order_id}} has shipped.",
      "type": "body"
    }
  ],
  "revision": 4
}
Codevoorbeeld
# write the English content of a draft
bird whatsapp templates versions languages set order_update wav_01krdgeqcxet5s7t44vh8rt9mg en --body-file en.json

# write it only if nobody has edited it since you read revision 4
bird whatsapp templates versions languages set order_update wav_01krdgeqcxet5s7t44vh8rt9mg en --body-file en.json --revision 4

Options

Concurrency

NameDescription
--revision <n>The revision you last read for this language, making the write a compare-and-set: a mismatch is refused rather than overwriting an edit you have not seen. Omit it for last-write-wins, which is what a single writer wants

Request

NameDescription
--body-fileRead the JSON request body from this file; "-" reads stdin
--examplePrint a complete example request body, then exit
--dry-runPrint the resolved request without sending it, then exit
--idempotency-keyDeduplication key; a retry with the same key won't act twice

Options

NameDescription
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird whatsapp templates versions languages deleteDelete a language from the draft
bird whatsapp templates versions languages discardDiscard a language's draft edits back to its submitted copy
bird whatsapp templates versions languages getGet a version's language
bird whatsapp templates versions languages listList a version's languages