---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/bulk-messaging/send-whatsapp-messages-with-content-templates#article
headline: Send WhatsApp messages with Content Templates
description: Learn how to send WhatsApp messages with Content Templates, add channel fallback, and receive replies using Twilio Bulk Messaging.
url: https://www.twilio.com/docs/bulk-messaging/send-whatsapp-messages-with-content-templates
inLanguage: en
dateModified: 2026-08-06T17:15:25.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Send WhatsApp messages with Content Templates

Twilio Bulk Messaging lets you send WhatsApp messages to your recipients using [Content Templates](/docs/content/overview).

You can send WhatsApp on its own or combine it with RCS, SMS, or both through channel fallback.

## Prerequisites

Before you begin, make sure you have the following:

* An approved WhatsApp sender: To register one, see [Register WhatsApp senders using Self Sign-up](/docs/whatsapp/self-sign-up).
* An approved [Content Template](/docs/content/overview): WhatsApp requires template approval for outbound messages.

## Send a WhatsApp message with a Content Template

To send a WhatsApp message, reference an approved Content Template by its **Content SID** (starts with `HXXXXXX`) in the `content` object. Set the recipient's `channel` to `WHATSAPP`, and provide a value for each template variable in the `variables` object.

```bash
curl -X POST 'https://comms.twilio.com/v1/Messages' \
--header 'Content-Type: application/json' \
--data '{
   "from": {
       "senderPoolId": "comms_senderpool_xxxx"
   },
   "to": [
       {
           "address": "+15558675310",
           "channel": "WHATSAPP",
           "variables": {
               "1": "Darth",
               "2": "Vader"
           }
       },
       {
           "address": "+15558675311",
           "channel": "WHATSAPP",
           "variables": {
               "1": "Spongebob",
               "2": "Squarepants"
           }
       }
   ],
   "content": {
       "contentId": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
   }
}' \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

### Reference template variables by position

The Content Template expects the same variable names you use in [Programmable Messaging](/docs/messaging). Reference each variable by its positional index (`1`, `2`, and so on) rather than by a named variable, as described in [Using Variables with Content Templates](/docs/content/using-variables-with-content-api).

```json
"variables": {
    "1": "Darth",
    "2": "Vader"
}
```

## Add channel fallback to WhatsApp

You can combine WhatsApp with RCS, SMS, or both so that Twilio attempts delivery on a fallback channel when WhatsApp delivery fails. To do this, send from a [Sender Pool](/docs/bulk-messaging/sender-pools) that includes a WhatsApp sender along with your other senders.

Include the recipient's address for each channel in the fallback order. Because WhatsApp uses a distinct address, list it separately even when it matches the phone number used for SMS. For example, to fall back to SMS after a failed WhatsApp message, specify both the recipient's WhatsApp-enabled phone number and their phone number for SMS delivery.

```bash
curl -X POST 'https://comms.twilio.com/v1/Messages' \
--header 'Content-Type: application/json' \
--data '{
   "to": [
       {
           "addresses": [
               { "address": "+15558675310", "channel": "WHATSAPP" },
               { "address": "+15558675310", "channel": "PHONE" }
           ],
           "variables": {
               "1": "Darth",
               "2": "Vader"
           }
       }
   ],
   "content": {
       "contentId": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
   },
   "from": {
       "senderPoolId": "comms_senderpool_xxxx",
       "channels": {
           "filterIn": ["WHATSAPP", "SMS"],
           "priority": [
               { "channel": "WHATSAPP", "priority": 0 },
               { "channel": "SMS", "priority": 1 }
           ] 
       }
   },
}' \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

### Configure fallback content in your Content Template

When you use fallback, every channel must send the same content type. Use a single Content Template that has fallback content configured, so the template can render on each channel in the fallback order. You can't mix content types across channels within one message.

For details on building a template with fallback content, see[ Content Template dynamic content fallback](/docs/bulk-messaging/rich-content#content-template-dynamic-content-fallback).

## Send rich content over WhatsApp

Inline rich content isn't yet supported for WhatsApp. To send rich content, such as cards or media, over WhatsApp, use an approved Content Template. Define the rich content in the template rather than in the `content` object of your API request.

## Receive WhatsApp replies

Inbound events through Bulk Messaging are in private beta and don't have a Service Level Agreement (SLA) yet. To receive replies to your WhatsApp messages, configure the webhook URL directly on your WhatsApp sender in the [Twilio Console](https://1console.twilio.com/go?to=/account/__account__/us1/senders-hub/list/whatsapp). Twilio delivers inbound WhatsApp events to that webhook.

To configure the webhook, navigate to **Products & Services > Numbers and Senders > Overview** in the console sidebar. Select the **WhatsApp** tab, choose your sender, click **Edit Sender**, and specify your inbound message webhook.

If your use case isn't covered by the webhook approach, reach out to Twilio Support.

## Next steps

* Learn about [Channel Fallback](/docs/bulk-messaging/channel-fallback) across all channels.
* See how to manage senders with [Sender Pools](/docs/bulk-messaging/sender-pools).
* Explore [Rich Content](/docs/bulk-messaging/rich-content) options for other channels.
