This document describes limited-time offer templates and how to use them.
Limited-time offer templates allow you to display expiration dates and running countdown timers for offer codes in template messages, making it easy for you to communicate time-bound offers and drive customer engagement.
MARKETING
are supported.Use the WhatsApp Business Account > Message Templates endpoint to create a limited-time offer template.
POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>/messages_templates
{ "name": "<TEMPLATE_NAME>", "language": "<TEMPLATE_LANGUAGE>", "category": "marketing", "components": [ /* Header component optional */ { "type": "header", "format": "<HEADER_FORMAT>", "example": { "header_handle": [ "<HEADER_ASSET_HANDLE>" ] } }, /* Limited-time offer component required */ { "type": "limited_time_offer", "limited_time_offer": { "text": "<LIMITED_TIME_OFFER_TEXT>", "has_expiration": <HAS_EXPIRATION> } }, /* Body component required */ { "type": "body", "text": "<BODY_TEXT>", "example": { "body_text": [<BODY_TEXT_VARIABLE_EXAMPLES>] } }, /* Copy code button component optional */ { "type": "buttons", "buttons": [ { "type": "copy_code", "example": "<OFFER_CODE_EXAMPLE>" }, { "type": "url", "text": "<URL_BUTTON_TEXT>", "url": "<URL_BUTTON_URL>", "example": [ "<URL_EXAMPLE_WITH_VARIABLE_EXAMPLE>" ] } ] } ] }
Placeholder | Description | Example Value |
---|---|---|
String | Required. Body component text. Supports variables. Maximum 600 characters. |
|
Array of strings | Required if body component text uses variables. Array of example variable strings. Must supply examples for all placeholders in No maximum, but counts against |
|
Boolean | Optional. Set to |
|
Media asset handle | Required if using an image or video header. Uploaded media asset handle. Use the Resumable Upload API to generate an asset handle. |
|
Enum | Required if using a header. Can be |
|
String | Required. Offer details text. Maximum 16 characters. |
|
String | Required. Example offer code. Maximum 15 characters. |
|
Enum | Required. Template language and locale code. |
|
String | Required. Template name. Maximum 512 characters. |
|
String | Required. URL button label text. Supports 1 variable. 25 characters maximum. |
|
String | Required. URL of website that loads in the device's default mobile web browser when the URL button is tapped by the WhatsApp user. Supports 1 variable appended to the end of the URL string. Maximum 2000 characters. |
|
String | Required if URL uses a variable. Example URL with example variable appended to the end. No maximum, but value counts against |
|
The delivered message can display an offer expiration details section with a heading, an optional expiration timer, and the offer code itself.
The expiration timer is a text string that is not customizable, but it will change to red text if the message is viewed and the offer code is expiring within the next hour. (You include the actual offer code and its expiration timestamp when you send the template in a template message.)
This is an example request to create a limited-time offer template that uses:
curl 'https://graph.facebook.com/v17.0/102290129340398/message_templates' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer EAAJB...' \ -d ' { "name": "limited_time_offer_caribbean_pkg_2023", "language": "en_US", "category": "marketing", "components": [ { "type": "header", "format": "image", "example": { "header_handle": [ "4::aW..." ] } }, { "type": "limited_time_offer", "limited_time_offer": { "text": "Expiring offer!", "has_expiration": true } }, { "type": "body", "text": "Good news, {{1}}! Use code {{2}} to get 25% off all Caribbean Destination packages!", "example": { "body_text": [ [ "Pablo", "CARIBE25" ] ] } }, { "type": "buttons", "buttons": [ { "type": "copy_code", "example": "CARIBE25" }, { "type": "url", "text": "Book now!", "url": "https://awesomedestinations.com/offers?code={{1}}", "example": [ "https://awesomedestinations.com/offers?ref=n3mtql" ] } ] } ] }'
{ "id": "546151681022936", "status": "PENDING", "category": "MARKETING" }
Once your limited-time offer template is approved, you can use the Cloud API to send it in a limited-time offer template message.