Templates step by step
This guide explains how to structure a WhatsApp template using the BSP API, from basic components to buttons and variables.
Template structure
A template is made up of up to one HEADER, a BODY (required), a FOOTER and a BUTTONS component:
| Component | Required | Max |
|---|---|---|
HEADER | No | 1 |
BODY | Yes | 1 |
FOOTER | No | 1 |
BUTTONS | No | 1 (up to 10 buttons) |
Categories
| Category | Usage |
|---|---|
MARKETING | Promotions, offers, announcements |
UTILITY | Order confirmations, receipts, notifications |
AUTHENTICATION | OTP codes, verification |
AUTHENTICATION templates can only send OTP and do not allow URLs, media or emojis. Their parameters are limited to 15 characters.Basic example: text with variable
{
"name": "welcome_message",
"language": "es",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "¡Hola {{1}}! Welcome to Chattigo.",
"example": {
"body_text": [["Juan"]]
}
}
]
}Every variable (
{{1}}, {{name}}) requires the example field with sample values. Without it, Meta rejects the template.Parameter formats
| Format | Syntax | Example |
|---|---|---|
positional (default) | {{1}}, {{2}} | "example": {"body_text": [["val1", "val2"]]} |
named | {{first_name}} | "example": {"body_text_named_params": [{"param_name": "first_name", "example": "Pablo"}]} |
Full example: header + body + footer + buttons
{
"name": "order_status",
"language": "es",
"category": "UTILITY",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Your order {{1}}",
"example": { "header_text": ["#12345"] }
},
{
"type": "BODY",
"text": "Your order was shipped and will arrive on {{1}}.",
"example": { "body_text": [["Friday 20th"]]
}
},
{ "type": "FOOTER", "text": "Thank you for shopping at Chattigo Store." },
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Track order",
"url": "https://store.example.com/track/{{1}}",
"example": ["12345"]
}
]
}
]
}Button types
| Type | Max | Notes |
|---|---|---|
QUICK_REPLY | 10 | Max 25 characters of text |
URL | 2 | Max 2000 characters of URL |
PHONE_NUMBER | 1 | Max 20 characters of phone |
COPY_CODE | 1 | Requires example with the code |
VOICE_CALL | 1 | — |
OTP | 1 | AUTHENTICATION only, with otp_type |
MPM | 1 | Multi-product, with catalog |
SPM | 1 | Single product |
FLOW | 1 | WhatsApp Flows |
CATALOG | 1 | Product catalog |
REQUEST_CONTACT_INFO | 1 | Requests the user’s number, no text or example |
QUICK_REPLY buttons must be grouped together, not interleaved with other types. For example, [URL, PHONE, QR, QR] is valid; [QR, URL, QR] is not.Text limits
| Component | Max |
|---|---|
HEADER TEXT | 60 characters |
BODY | 1024 characters |
FOOTER | 60 characters |
| Template name | 512 characters (lowercase + underscore) |
Pre-create checklist
- The category matches the message content.
- The language code is valid (
es,en_US,pt_BR…). - The name uses lowercase, alphanumeric and underscores.
- The
BODYis present and does not exceed 1024 characters. - Every variable has its
examplefield populated. URLbuttons with variables haveexamplepopulated.COPY_CODEhasexamplewith the code.- Media header: the handler was already uploaded (
example.header_handle). - No
QUICK_REPLYmixed with other types in the same group.