Coupon Code Templates for Marketing messages
This feature will be coming soon to our UI in the 360dialog Hub.
Coupon code templates are marketing templates that display a single copy code button. When tapped, the code is copied to the customer's clipboard.

- Coupon code templates are currently not supported by the WhatsApp Web Client.
- Codes are limited to 15 characters.
- Button text cannot be customized.
- Templates are limited to one copy code button.
post
[base-url]
/v1/configs/templates
Create a template
Placeholder | Description | Example Value |
---|---|---|
<NAME> String | Required. Template name.
Maximum 512 characters. | fall2023_promotion |
<LANGUAGE> Enum | en_US | |
<EXAMPLE> String | Required.
Coupon code to be copied when tapped.
Maximum 15 characters. | 25OFF |
{
"name": "<NAME>",
"language": "<LANGUAGE>",
"category": "MARKETING",
"components": [
... // Additional components, if using
{
"type":"BUTTONS",
"buttons": [
{
"type":"COPY_CODE",
"example": "<EXAMPLE>"
},
... // Additional buttons, if using
]
}
]
}
Example Request
{
"name": "coupon_code_fall2023_25off",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Our Fall Sale is on!"
},
{
"type": "BODY",
"text": "Shop now through November and use code {{1}} to get {{2}} off of all merchandise!",
"example": {
"body_text": [
[
"25OFF",
"25%"
]
]
}
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "Unsubscribe"
},
{
"type": "COPY_CODE",
"example": "250FF"
}
]
}
]
}
{
"category" : "MARKETING",
"id" : "1924084211297547",
"status" : "PENDING"
}
This feature is currently available only in the Cloud API. There is no information on whether it will be introduced in the On-premise API.
Use the Cloud API to send approved coupon code templates in template messages. See Sending Coupon Code Templates.
post
https://waba-v2.360dialog.io
/messages
Send Template Messages
It is only possible to send Templates with an Active status. A message template's status can change automatically from Active to Paused or Disabled based on feedback from customers. For this reason, we recommend that you monitor status changes to take appropriate actions whenever a message template that you rely upon becomes, or is in danger of becoming, paused or disabled.
Placeholder | Description | Example Value |
---|---|---|
<TO> String | Required. | +16505551234 |
<NAME> String | Required. Name of the template to be sent. | coupon_code_fall2023_25off |
<CODE> String | Required.
The template's language and locale code. | en_US |
<INDEX> Integer | Required. Indicates order in which button should appear, if the template uses multiple buttons. Buttons are zero-indexed, so setting value to 0 will cause the button to appear first, and another button with an index of 1 will appear next, etc. | 0 |
<COUPON_CODE> String | Required. The coupon code to be copied when the customer taps the button. | 25OFF |
{
"messaging_product": "whatsapp",
"to": "<TO>",
"type": "template",
"template": {
"name": "<NAME>",
"language": {
"code": "<CODE>"
},
"components": [
... // Additional components, if using
{
"type": "button",
"sub_type": "COPY_CODE",
"index": <INDEX>,
"parameters": [
{
"type": "coupon_code",
"coupon_code": "<COUPON_CODE>"
}
]
}
]
}
}
{
"messaging_product": "whatsapp",
"to": "16505551234",
"type": "template",
"template": {
"name": "coupon_code_fall2023_25off",
"language": {
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "25OFF"
},
{
"type": "text",
"text": "25%"
}
]
},
{
"type": "button",
"sub_type": "COPY_CODE",
"index": 1,
"parameters": [
{
"type": "coupon_code",
"coupon_code": "25OFF"
}
]
}
]
}
}
{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "16505551234",
"wa_id": "16505551234"
}
],
"messages": [
{
"id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgARGBIxRjk1REYzMDBERDE3RUI0RDYA"
}
]
}