WhatsApp

Create a WhatsApp template

Changed on

This endpoint creates a WhatsApp template in Design Studio. Creating a template doesn't send anything to Meta. Before you can send the template to your audience, you need to submit it to Meta for approval, and Meta needs to approve it.

You write the template's content as WhatsApp markup, a set of elements that match the components you can add in Design Studio. See WhatsApp building blocks for every element and the rules the markup follows.

Make sure the template's content, category, and language are right before you submit it. After you submit a template, you can't change those fields unless Meta rejects it.

post/v1/design_studio/whatsapp

Request

  • Base URL
    https://api.customer.io
  • URL
    https://api.customer.io/v1/design_studio/whatsapp
  • Auth
    none declared

Request body

namestring required

A friendly name for the template. Your team sees this name in Design Studio, so pick one that helps them find the template. Customer.io also uses it as the basis for the template name it gives Meta when you submit the template.

parent_folder_idstring uuid nullable

UUID of the folder to create the template in. Omit or pass null to create the template at the root level. You can list folders to find the UUID of the folder you want.

category'MARKETING' | 'UTILITY' required

The Meta template category. Use MARKETING for promotional content and UTILITY for non-promotional messages about a transaction, like an order update. You can't create Authentication templates in Design Studio. Learn more about template categories in Meta's docs.

languagestring required

The Meta language code for the template, like en_US. You need to create a separate template for each language you want to support.

recipientstring required

Liquid that resolves to the WhatsApp phone number of the person you're messaging, like {{customer.phone}}. Customer.io evaluates it against that person's profile when it sends the message. Don't set a static phone number here; if you do, every send of this template goes to that one number instead of to each person.

sender_idinteger nullable

The ID of the WhatsApp sender identity to send the template from. You can list sender identities to find the ID you want. The sender must be a WhatsApp sender, not an SMS or email sender.

contentstring required

The template, written as WhatsApp markup. Put your message text in an <x-wa-body> element inside an <x-whatsapp> element; the text can include liquid. You can also add a header or header media, a footer, and buttons. See WhatsApp building blocks for every element.

Example request

{
  "name": "Order shipped",
  "category": "UTILITY",
  "language": "en_US",
  "recipient": "{{customer.phone}}",
  "sender_id": 4,
  "content": "<x-whatsapp><x-wa-body>Hi {{customer.first_name}}, your order has shipped.</x-wa-body></x-whatsapp>"
}

Response

WhatsApp template created

Example response

{
  "whatsapp": {
    "name": "Order shipped",
    "category": "UTILITY",
    "language": "en_US",
    "status": "APPROVED",
    "recipient": "{{customer.phone}}",
    "sender_id": 4,
    "content": "<x-whatsapp><x-wa-body>Hi {{customer.first_name}}, your order has shipped.</x-wa-body></x-whatsapp>",
    "created": 1790000000,
    "updated": 1790000000
  }
}

Changes