Template Elements

Template structure: headers, body, footer, buttons, variables, and practical limits.

Core Components

Template structures are built from:

  • HEADER (optional) — text, image, video, document, or location
  • BODY (required for most categories) — the main message text with variables
  • FOOTER (optional) — small text below the body
  • BUTTONS (optional) — quick reply, URL, phone, or copy-code actions

Header Formats

Supported header formats:

  • TEXT — plain text, supports one variable. Don't use Markdown formatting characters in a header
  • IMAGE — JPEG or PNG image
  • VIDEO — MP4 video
  • DOCUMENT — PDF or other document types
  • LOCATION — a map whose coordinates you supply at send time; UTILITY and MARKETING templates only. See Location templates
  • GIF — an MP4 of up to 3.5 MB, only for marketing templates sent through Marketing Messages API for WhatsApp

A media header needs a sample uploaded through Meta's Resumable Upload API when you create the template; the sample is part of template review. The Dualhook dashboard and the Runtime API's message_template_media route do that upload for you.

For media handling, see Media Messages and Upload, Retrieve & Delete Media.

Variable Rules

Templates use one of two parameter formats, set with parameter_format at creation (positional if omitted):

  • Positional: {{1}}, {{2}}, {{3}}, numbered in order from 1. Example and send values must follow placeholder order.
  • Named: {{first_name}}, {{order_number}}: unique names of lowercase letters and underscores. Example values go in body_text_named_params or header_text_named_params, and send values carry a parameter_name, in any order.

Every parameter needs an example value at creation. Common review rejections:

  • Missing or mismatched curly braces, or special characters such as #, $, or % inside a parameter.
  • Positional parameters out of sequence, for example {{1}}, {{2}}, {{5}}.
  • Too many parameters for the length of the text.
  • Text that starts or ends with a parameter.

Text Formatting

Marketing and utility templates support WhatsApp text formatting in the body:

FormatSyntaxResult
Bold*text*text
Italic_text_text
Strikethrough~text~text
Monospace```text```text

Use the formatting toolbar in the template editor to apply styles. Formats can be combined (e.g. *_bold italic_*). Authentication templates do not support text formatting.

Practical Limits

ElementLimit
Header textUp to 60 characters, 1 parameter
Body textUp to 1024 characters
Footer textUp to 60 characters
Total buttonsUp to 10 (marketing & utility)
URL buttonsMax 2 within the 10 total; URL up to 2000 characters, 1 parameter at the end
Phone buttonsMax 1 within the 10 total; number up to 20 characters
Copy-code buttonsMax 1; code up to 20 characters
Quick reply buttonsUp to 10
Button labelUp to 25 characters

Quick reply and call-to-action buttons can be mixed in the same template. For example: 2 URL + 1 phone + 7 quick reply = 10 total. Keep quick replies together: QUICK_REPLY, QUICK_REPLY, URL, PHONE_NUMBER is valid, QUICK_REPLY, URL, QUICK_REPLY is rejected.

With more than three buttons, WhatsApp shows two and puts the rest behind See all options. Templates with four or more buttons, or a quick reply mixed with another button type, can't be viewed on WhatsApp desktop; the recipient is asked to open them on a phone.

For sending templates with variables, media headers, and buttons, see Sending Template Messages.

Dualhook Boundary

The dashboard template editor builds TEXT, IMAGE, VIDEO, DOCUMENT, and LOCATION headers, positional {{1}} variables, and quick-reply, URL, and phone-number buttons, plus a coupon (copy code) button on a Marketing template and the copy-code button of an authentication template. The Runtime API also accepts named parameters and COPY_CODE, OTP, FLOW, CATALOG, and MPM buttons, with enum values in upper or lower case. Neither offers GIF headers, voice-call buttons, carousels, limited-time offers, or product headers; create those templates in WhatsApp Manager or with your own Meta app.

Related

  • TemplatesTemplate lifecycle, categories, and management through Dualhook and Meta Graph API.
  • Sending Template MessagesHow to send template messages via Cloud API with variables, media headers, and URL buttons.
Browse more docsStart Free Trial