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
  • IMAGE — JPEG or PNG image
  • VIDEO — MP4 video
  • DOCUMENT — PDF or other document types
  • LOCATION — when supported by your account/version

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

Variable Rules

Use numbered placeholders: {{1}}, {{2}}, {{3}}, etc.

Best practices:

  • Keep variable ordering stable.
  • Provide clear example values for review.
  • Avoid consecutive placeholders without context text between them.

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
Body textUp to 1024 characters
Footer textUp to 60 characters
Total buttonsUp to 10 (marketing & utility)
URL buttonsMax 2 within the 10 total
Phone buttonsMax 1 within the 10 total
Quick reply buttonsRemainder up to 10 total

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.

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

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