Sign inGet started

bird whatsapp templates versions submit

Usage

代码示例
bird whatsapp templates versions submit <template-ref> <version-id> [flags]

Description

Submit a template version for review
Checks the draft and, unless validate_only is set, freezes it as an immutable version and sends every language to WhatsApp for review. Call it once with validate_only: true first: that reports every problem across every language in one round trip and freezes nothing, which is cheaper than finding the problems one submit at a time. A real submit answers 202, and only the languages whose content changed go to WhatsApp as pending: one whose content already matches its approved copy is carried forward still approved and is never sent. A submit where every language is unchanged is therefore settled the moment it returns, with nothing to poll for. Read the version's languages to see which are which, and where any is pending, read the template's pending_version_id and those languages until they settle. A clean check does not guarantee WhatsApp approves, because WhatsApp offers no way to ask in advance. Use a different idempotency key for the check and the submit.
Build the request from flags, a JSON WhatsAppTemplateSubmit 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 5 of 7 of "Author a WhatsApp template and get it approved". Previous: bird whatsapp templates versions languages set. Next: bird whatsapp templates versions submit. Step 6 of 7 of "Author a WhatsApp template and get it approved". Previous: bird whatsapp templates versions submit. Next: bird whatsapp templates get.

Examples

代码示例
# print the body shape (no credentials needed)
bird whatsapp templates versions submit --example

# the body it prints:
代码示例
{
  "validate_only": true
}

Options

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
--validate-onlyCheck the draft without submitting it. Every language is checked and every problem reported, but nothing is frozen and nothing is sent to WhatsApp. A clean result does not guarantee WhatsApp approval: WhatsApp offers no way to ask in advance, so it can still refuse a submission these checks passed. Use a different idempotency key for the validation and the submission. Reusing one key with different request bodies is rejected.
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird whatsapp templates versions createCreate a template draft
bird whatsapp templates versions deleteDelete a template's open draft
bird whatsapp templates versions getGet a template version
bird whatsapp templates versions listList a template's versions