Core Components
Template structures are built from:
HEADER(optional) — text, image, video, document, or locationBODY(required for most categories) — the main message text with variablesFOOTER(optional) — small text below the bodyBUTTONS(optional) — quick reply, URL, phone, or copy-code actions
Header Formats
Supported header formats:
TEXT— plain text, supports one variableIMAGE— JPEG or PNG imageVIDEO— MP4 videoDOCUMENT— PDF or other document typesLOCATION— 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.
Practical Limits
| Element | Typical limit |
|---|---|
| Header text | Up to 60 characters |
| Body text | Up to 1024 characters |
| Footer text | Up to 60 characters |
| Quick reply buttons | Up to 3 |
| CTA buttons | Typically up to 2 URL + 1 phone |
Limits can evolve by Graph API version and account capability — validate in your current environment.
For sending templates with variables, media headers, and buttons, see Sending Template Messages.