Coupon code templates
Updated: Dec 3, 2025 Coupon code templates are marketing templates that display a single copy code button. When tapped, the code is copied to the customer’s clipboard.
Limitations
Coupon code templates are currently not supported by the WhatsApp web client. Copy code button text cannot be customized. Templates are limited to one copy code button.Creating coupon code templates
Use the POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_templates endpoint to create coupon code templates.Request syntax
Request parameters
| Placeholder | Description | Example Value |
|---|---|---|
<ACCESS_TOKEN>String | Required. Access token. | EAAAN... |
<API_VERSION>String | Optional. API version. If omitted, defaults to the newest API version available to your app. | v23.0 |
<BODY_PARAMETER_EXAMPLE_VALUE>String | Required if using a body component string that includes one or more parameters. Example parameter value. You must supply an example for each parameter defined in your body component string. | 0itCfer5xDB14SHWLACB |
<BODY_TEXT>String | Required. Template body text. Variables are supported. Maximum 1024 characters. | Shop now through the end of December and use the one-time use code {{1}} to get {{2}} off of your entire order! |
<COPY_CODE_BUTTON_EXAMPLE_CODE>String | Required. Code to be copied to device clipboard when tapped. Maximum 20 characters. | fLBponPDsqF0KQThzkrf |
<HEADER_TEXT>String | Required if using a text header component. Header text. Maximum 60 characters. | Our Winter Sale is on! |
<QUICK_REPLY_BUTTON_LABEL_TEXT> | Required if using a quick-reply button. Button label text. Maximum 25 characters. Alphanumeric characters only. | Unsubscribe |
<TEMPLATE_LANGUAGE>String | Required. Template language code. | en_US |
<TEMPLATE_NAME>String | Required. Template name. Must be unique, unless existing templates with the same name have a different template language. Maximum 512 characters. Lowercase, alphanumeric characters and underscores only. | coupon_code_onetime_winter_2025 |
<WHATSAPP_BUSINESS_ACCOUNT_ID>String | Required. WhatsApp Business Account ID. | 102290129340398 |
Response syntax
Upon success:Response parameters
| Placeholder | Description | Example value |
|---|---|---|
<TEMPLATE_CATEGORY> | Template category. | MARKETING |
<TEMPLATE_ID> | Template ID. | 1627019861106475 |
<TEMPLATE_STATUS> | Template status. | PENDING |
Example request
Example response
Sending coupon code templates
Request syntax
Use the POST /<BUSINESS_PHONE_NUMBER_ID>/messages endpoint to send an approved coupon template in a template message.Request parameters
| Placeholder | Description | Example Value |
|---|---|---|
<ACCESS_TOKEN>String | Required. Access token. | EAAAN... |
<API_VERSION>String | Optional. API version. If omitted, defaults to the newest API version available to your app. | v23.0 |
<BUSINESS_PHONE_NUMBER_ID>String | Required. WhatsApp business phone number ID. | 106540352242922 |
<BUTTON_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. Only accepting alphanumeric characters. Maximum 20 characters. | 25OFF |
<TEMPLATE_NAME>String | Required. Name of the template to be sent. | coupon_code_fall2023_25off |
<TEMPLATE_LANGUAGE>String | Required. The template’s language and locale code. | en_US |
<USER_PHONE_NUMBER>String | Required. The WhatsApp ID or phone number of the customer to send the message to. See Phone Number Formats. | +16505551234 |
Response syntax
Upon success the API will respond with:Response parameters
| Placeholder | Description | Sample Value |
|---|---|---|
<GROUP_ID>String | The string identifier of a group made using the Groups API. This field shows when messages are sent, received, or read from a group. Learn more about the Groups API | Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD |
<PACING_STATUS>String | Indicates template pacing status. The message_status property is only included in responses when sending a template message that uses a template that is being paced. | wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI4MjZGRDA0OUE2OTQ3RkEyMzcA |
<WHATSAPP_USER_PHONE_NUMBER>String | WhatsApp user’s WhatsApp phone number. May not match wa_id value. | +16505551234 |
<WHATSAPP_USER_ID>String | WhatsApp user’s WhatsApp ID. May not match input value. | 16505551234 |
<WHATSAPP_MESSAGE_ID>String | WhatsApp Message ID. This ID appears in associated messages webhooks, such as sent, read, and delivered webhooks. | wamid.HBgLMTY0NjcwNDM1OTUVAgARGBI4MjZGRDA0OUE2OTQ3RkEyMzcA |

