Sign inGet Started

Submit a template version for review

POST
/v1/whatsapp/templates/{template_ref}/versions/{version_id}/submit
const draftId = "wav_01krdgeqcxet5s7t44vh8rt9mg";
const check = await bird.whatsapp.templates.versions.submit("order_update", draftId, {
  validate_only: true,
});
for (const problem of check.errors) console.log(problem.language, problem.field, problem.message);
if (check.valid) {
  const submitted = await bird.whatsapp.templates.versions.submit("order_update", draftId);
  console.log(submitted.version?.id);
}
प्रतिक्रिया200
{
  "errors": [
    {
      "language": "pt-BR",
      "field": "components[2].cards[0].components[1].example_parameters[0].url",
      "code": "E15025",
      "message": "A body block needs text."
    }
  ],
  "version": {
    "id": "wav_01krdgeqcxet5s7t44vh8rt9mg",
    "template_id": "wat_01krdgeqcxet5s7t44vh8rt9mg",
    "version_number": 4,
    "submitted_at": "2026-07-20T11:04:00Z",
    "languages": {
      "en": {
        "status": "approved",
        "components": [
          {
            "type": "body",
            "text": "Your verification code is {{1}}.",
            "example_parameters": [
              {
                "type": "text",
                "text": "123456"
              }
            ]
          }
        ]
      }
    },
    "created_at": "2026-07-20T10:31:00Z"
  },
  "next": [
    {
      "kind": "operation"
    }
  ]
}

Validates the template draft before freezing it. If validation fails, the API returns 200 OK with every problem across all languages and creates no version. If validation passes, the API freezes an immutable version and returns 202 Accepted. Only the languages whose content differs from their approved copy are sent to Meta and marked pending; the rest carry their existing verdict forward untouched, so a version whose languages are all unchanged comes back already settled. A language an earlier version carried but the draft dropped is deleted at Meta in the background. It is absent from the new version, so it has no pending state. The version becomes live when any language is approved, and no replacement draft opens automatically.

Set validate_only: true to run the same checks without freezing or submitting a version. Local validation cannot predict Meta's decision. A 202 Accepted response confirms the version was frozen and accepted. Poll the version or the template's pending_version_id for the verdicts on whichever languages it marked pending.

पैरामीटर

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.

Request Payload

validate_only
boolean

Check 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 Payload

valid
boolean
आवश्यक

Whether the version passed every check.

errors
array of object
आवश्यक

Every problem found across every language. One round trip identifies all problems. Empty when valid is true.

चाइल्ड एट्रिब्यूट दिखाएँ
version
nullable object

The version this submit froze, or null when nothing was frozen: a check run, or a submit that found problems.

चाइल्ड एट्रिब्यूट दिखाएँ
version.id
string
आवश्यक

Stable Bird identifier for the version.

version.template_id
string
आवश्यक

The template this version belongs to.

version.version_number
nullable integer

The version's sequence number, assigned when it is submitted. Null on a draft, which has not been submitted and has no place in the sequence yet.

version.submitted_at
nullable string
आवश्यक

When this version was submitted to Meta. Null on a draft, which has not been submitted, and null for a built-in template's version, which Bird ships already approved rather than submitting on your behalf.

version.languages
object
आवश्यक

This version's content, keyed by BCP-47 language tag, with what its submission did with each language.

version.created_at
nullable string
आवश्यक

When the version was opened. Null for a built-in template's version, which Bird ships rather than stores.

next
array of object

What to do next with this outcome. 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.

A failed check routes back to the languages that need an edit; a clean one routes to the real submit, and then to polling the template for WhatsApp's verdicts.

चाइल्ड एट्रिब्यूट दिखाएँ

इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।