| Component | Description |
|---|---|
| Header | Optional media such as an Image, Video, or Document displayed at the top of the message. |
| Body | Main promotional message. Supports static text and variables. |
| Limited-Time Offer | Displays a live countdown timer showing how much time is left before the offer expires. |
| Copy Code Button | Optional button that copies the coupon code with a single tap. |
| URL Button | Optional button that directs customers to a website or landing page. |
Note: The available components depend on how the template is created and approved by Meta.
{
"to": "<USER_PHONE_NUMBER>",
"type": "template",
"template": {
"name": "<TEMPLATE_NAME>",
"language": {
"code": "<LANGUAGE_CODE>"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "<IMAGE_URL>"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "<BODY_VARIABLE_VALUE_1>"
},
{
"type": "text",
"text": "<BODY_VARIABLE_VALUE_2>"
}
]
},
// OR
{
"type": "limited_time_offer",
"parameters": [
{
"type": "limited_time_offer",
"limited_time_offer": {
"expiration_time_ms": <EXPIRATION_TIME_MS>
}
}
]
},
// Optional Copy Code Button
{
"type": "button",
"sub_type": "copy_code",
"index": 0,
"parameters": [
{
"type": "coupon_code",
"coupon_code": "<COUPON_CODE>"
}
]
},
// Optional URL Button
{
"type": "button",
"sub_type": "url",
"index": 1,
"parameters": [
{
"type": "text",
"text": "<BUTTON_URL_VARIABLE_VALUE>"
}
]
}
]
}
}Note: Include only the components that are configured in your approved WhatsApp template. For example, if your template does not include a Copy Code button, you can omit that button component.