LogoLogo
Become a PartnerStatus Page
  • get started
    • Welcome to 360Dialog
    • Quickstarts
      • Register as a Meta Tech Provider
      • Add a WhatsApp Number
      • Set up Integrated Onboarding
      • Create a Message Template
      • Send a Message
      • (temp title) Getting started as a partner
    • Pricing & Billing
      • Payment Methods for BR: Pix & Boleto
      • Month Closing Invoice (MCI)
    • Get API Access
    • Tech Provider Program
      • Understanding the Meta Tech Provider Program
      • Becoming a Meta Tech Provider: A Step-by-Step Guide
  • MM Lite Beta Program
    • Onboarding
    • Sending Messages
    • Expected Errors & Programming Languages
    • MM Lite Sandbox Testing
      • Sending Messages using MM Lite Sandbox
      • Expected Erros & Programming Languages
  • Partner & Account Management
    • Solutions for Partners
      • Benefits for Partners
      • Partner Hub
      • WABA Management
    • Account Setup & Management
      • Prerequisites and best practices for account creation
      • Account Structure
      • Account Creation
  • Integrations & API Development
    • Webhook Events & Setup
      • Webhook Events (Partner & Messaging API)
      • Webhook Configuration & Management
    • Integration Best Practices
      • Architecture and Security
      • Best Practices for Designing Integrations
        • Design a Stable Webhook Receiving Endpoint
      • Sizing Your Environment Based on Expected Throughput
      • Design a Resilient Message Sending Service
      • Integrated Onboarding
        • Basic Integrated Onboarding
        • Custom Integrated Onboarding
        • Host Your Own Embedded Signup
      • API Key Authentication for the Partner API
  • API Reference
    • Messaging API
    • Messaging Health Status
    • Sandbox (Test API Key)
    • Differences Between Cloud API and On-Premise API for Partners
      • [will be deprecated] Messaging with On-Premise API
    • Partner API
  • WABA Management
    • Managing WABA Accounts
      • Using the Partner Hub to manage Clients and Channels
      • Using the Partner API to manage Clients and Channels
      • Partner Permission to Generate API Key
      • Checking Usage & Statistics
    • Phone Number & Hosting
      • Migrating a Phone Number
        • Migrate number from Meta or alternate BSP to 360Dialog
        • Migrate a phone number to a new WABA
        • Migrate a phone number to a new WABA to change messaging Currency
      • WhatsApp Coexistence
        • Coexistence Onboarding
        • Coexistence Webhooks
      • Hosting type Change (On-premise API to Cloud API)
    • WABA Profile & Compliance
      • Display Name Guidelines
      • WABA Profile Info
      • WABA Policy Enforcement
      • Business Account Verification
    • Partner change (between 360Dialog Partners)
    • WhatsApp Flows
    • Accelerated Onboarding
    • Business Account Verification
  • Messaging
    • Sending & Receiving Messages
      • Conversations
      • Receiving messages
      • Before sending a message
    • Message Types
      • Conversational Components
      • Checklist for Message Broadcasts and Campaigns
      • Text messages
      • Interactive messages
        • Single and Multi Product Messages
        • Location Request Messages
        • Address Messages (India and Singapore only)
      • Contacts & Location Messages
    • Template Messages
      • Template Library
      • Template Elements
      • Sending Template Messages
      • Authentication Templates
        • Zero-Tap Authentication Templates
        • One-Tap Autofill Authentication Templates
        • Copy Code Authentication Templates
      • Catalog Templates
      • Product Card Carousel Templates
      • Single-Product Message Templates
      • Coupon Code Templates
      • Limited-Time Offer Templates
      • Multi-Product Templates
    • Media Messages
      • Upload, retrieve or delete media
    • Messaging Health & Troubleshooting
      • Messaging Limits & Quality Rating
      • Errors While Messaging
      • Messages statuses
  • Commerce & Payments
    • Payments (India Only)
      • Receive WhatsApp Payments via Payments Gateway
      • Receive WhatsApp Payments via Payment Links
      • Order Details Template Message
    • Payments (Singapore Only)
      • Receive WhatsApp Payments via Stripe
    • Products and Catalogs
      • India Businesses: Compliance for Commerce
  • Support & Updates
    • Help & Troubleshooting
      • FAQ
      • Error Code Reference
      • User Support Documentation
        • Tutorials
          • Page How to Troubleshoot Login Issues in the 360dialog Hub
          • How to Report an Issue
          • How to Contact Support
        • How-To Guides
          • Raise a support request
          • Requesting a Status Update for Business Verification
        • Reference
          • Troubleshooting Embedded Signup Issues
          • Commerce Policy Checks for WhatsApp API Access
          • Support Availability & SLAs
          • Incident Issue Prioritization
          • Case Types Table
        • Explanation
          • Why Business Verification Takes Time
          • Why Some Issues Are Not Emergencies
          • Understanding the Support Process
      • Support with Meta
    • Imprint & Data Privacy
    • Product Updates & News
      • How to ensure your Template Messages will be received
      • Integrated Onboarding new look and Campaigns Best Practices
Powered by GitBook
On this page
  • Limitations
  • Template Creation
  • Sending Coupon Templates

Was this helpful?

  1. Messaging
  2. Template Messages

Coupon Code Templates

PreviousSingle-Product Message TemplatesNextLimited-Time Offer Templates

Last updated 10 months ago

Was this helpful?

Coupon Code Templates are only available while using Cloud API.

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.

  • Codes are limited to 15 characters.

  • Button text cannot be customized.

  • Templates are limited to one copy code button.

Template Creation

Use the create template endpoint to create coupon code templates

POST https://waba-v2.360dialog.io/v1/configs/templates

Headers

Name
Type
Description

D360-API-KEY

string

object	{WABA Template}	
    name	string	optional
    namespace	string	optional
    category	string	optional
    components	array[object]	optional
        type	string	Allowed Values: BODY, HEADER, FOOTER, BUTTONS
        format	string	Allowed Values: TEXT, IMAGE, DOCUMENT, VIDEO
        text	string	optional
        example	string	optional
        buttons	object	optional
            type	string	Allowed Values: PHONE_NUMBER, URL, QUICK_REPLY
            text	string	required
            url	string	optional
            phone_number	string	optional
            example	string	optional
    language	string	optional
    rejected_reason	string	optional
    status	string	optional

Post Body

{
  "name": "<NAME>",
  "language": "<LANGUAGE>",
  "category": "MARKETING",
  "components": [
    ... // Additional components, if using
    {
      "type":"BUTTONS",
      "buttons": [
        {
          "type":"COPY_CODE",
          "example": "<EXAMPLE>"
        },
        ... // Additional buttons, if using
      ]
    }
  ]
}

Properties

Placeholder
Description
Example Value

<NAME>

String

Required.

Template name.

Maximum 512 characters.

fall2023_promotion

<LANGUAGE>

Enum

Required.

en_US

<EXAMPLE>

String

Required.

Coupon code to be copied when tapped.

Maximum 15 characters.

25OFF

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"
        }
      ]
    }
  ]
}

Example Response

{
  "category" : "MARKETING",
  "id" : "1924084211297547",
  "status" : "PENDING"
}

Sending Coupon Templates

Use the Cloud API to send approved coupon code templates in template messages

POST https://waba-v2.360dialog.io/messages

Request Body

Name
Type
Description

to

string

Recipient wa_id

type

string

Message type

language

string

Template language

policy

string

Delivery policy

code

string

Language code

name

string

Template name

messaging_product

string

Required only for Cloud API. Messaging service used for the request. Use "whatsapp".

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.

cupon_code

string

Required.

The coupon code to be copied when the customer taps the button.

Properties

Placeholder
Description
Example Value

<TO>

String

Required.

The WhatsApp ID or phone number of the customer to send the message to.

+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

Post Body Example

{
  "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>"
          }
        ]
      }
    ]
  }
}

Example Request

{
  "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"
          }
        ]
      }
    ]
  }
}

Template .

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 to take appropriate actions whenever a message template that you rely upon becomes, or is in danger of becoming, paused or disabled.

monitor status changes
language and locale code