Templates

Template lifecycle, categories, and management through Dualhook and Meta Graph API.

Overview

Templates are pre-approved message formats used when you message customers outside the active 24-hour customer service window. They are created at the WABA level and sent from a specific phone_number_id.

In Dualhook, templates can be synced, created, edited, duplicated, and deleted from the dashboard. Customers can also use the Graph-compatible dh_live_ Runtime API template routes to upload media-header samples and list, create, inspect status/quality/rejection details, update, and delete templates on the connection's stored WABA.

Never submit the connection's Meta token or appsecret_proof; Dualhook applies both internally and verifies template ownership before object-ID reads or mutations.

Categories

Supported categories:

Meta can reclassify template categories based on actual content. Dualhook surfaces category and status updates after sync.

Template Lifecycle

Common statuses:

  • PENDING — submitted, awaiting review
  • APPROVED — accepted and ready to send
  • REJECTED — not accepted; revise and resubmit
  • PAUSED — temporarily suspended due to quality
  • DISABLED — permanently disabled
  • IN_APPEAL — rejection is being challenged

Templates that are pending review or disabled cannot be edited until their status changes. You can duplicate any template to create a new version for resubmission.

Management API Examples

Create Template

For an image, video, or document header, first upload a sample through POST /v25.0/<WABA_ID>/message_template_media, then place the returned h value in example.header_handle. Dualhook keeps Meta's app ID and resumable upload session internal. See the Runtime API example.

{
  "name": "order_update_v1",
  "language": "en_US",
  "category": "UTILITY",
  "components": [
    {
      "type": "BODY",
      "text": "Hi {{1}}, your order {{2}} is now {{3}}.",
      "example": {
        "body_text": [["Alex", "A12345", "shipped"]]
      }
    }
  ]
}

List Templates

GET /<WABA_ID>/message_templates?fields=id,name,language,status,category,rejected_reason,components

Update Template Components

{
  "components": [
    {
      "type": "BODY",
      "text": "Hi {{1}}, your order {{2}} is now {{3}}. Track here: {{4}}",
      "example": {
        "body_text": [["Alex", "A12345", "shipped", "https://example.com/track/A12345"]]
      }
    }
  ]
}

Delete Template

DELETE /<WABA_ID>/message_templates?name=order_update_v1

For template structure details, see Template Elements. For send payloads, see Sending Template Messages.

Related

  • Template ElementsTemplate structure: headers, body, footer, buttons, variables, and practical limits.
  • Sending Template MessagesHow to send template messages via Cloud API with variables, media headers, and URL buttons.
  • Template AnalyticsMeasuring template performance: sent, delivered, read, and clicked metrics.
Browse more docsStart Free Trial