---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/bulk-messaging/personalization#article
headline: Personalization
description: Personalize Twilio Bulk Messaging sends per recipient using Content Templates, inline variables, and Liquid templating with conditional control flow.
url: https://www.twilio.com/docs/bulk-messaging/personalization
inLanguage: en
dateModified: 2026-08-20T18:09:16.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Personalization

Twilio Bulk Messaging personalizes messages for each recipient using Content Templates, inline variables, or Liquid templating.

## Content Templates

Each Content Template is identified by a unique `HXXXXXX` SID. Use this API to customize bulk messages for each recipient.

Reference template variables by their positional index (starting at 1) within the Content Template.

```bash
curl -X POST 'https://comms.twilio.com/v1/Messages' \
--header 'Content-Type: application/json' \
--data '{
   "from": {
       "address": "<Your Purchased Twilio Phone Number>",
       "channel": "SMS"
   },
   "to": [
       {
           "address": "+15558675310",
           "channel": "phone",
           "variables": {
               "1": "Fred"
           }
       },
       {
           "address": "+15558675311",
           "channel": "phone",
           "variables": {
               "1": "Sonny"
           }
       }
   ],
   "content": {
       "contentId": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
   }
}' \
-u $TWILIO_API_KEY:$TWILIO_API_SECRET
```

## Personalize messages inline

Alternatively, you can define and personalize message content inline. Within the content, enclose each variable name in double curly braces (`{{ }}`). Provide a default value for every variable to ensure that the message renders correctly when a recipient's variables don't contain the corresponding data.

```bash
curl -X POST 'https://comms.twilio.com/v1/Messages' \
--header 'Content-Type: application/json' \
--data '{
   "from": {
       "address": "<Your Purchased Twilio Phone Number>",
       "channel": "sms"
   },
   "to": [
       {
           "address": "+15558675310",
           "channel": "PHONE",
           "variables": {
               "name": "Fred"
           }
       },
       {
           "address": "+15558675311",
           "channel": "PHONE",
           "variables": {
               "name": "Sonny"
           }
       }
   ],
   "content": {
       "text": "Hello {{name | default: 'there'}}!"
   }
}' \
-u $TWILIO_API_KEY:$TWILIO_API_SECRET
```

## Advanced templating

Twilio Bulk Messaging supports [Liquid](https://shopify.github.io/liquid/) for advanced message templating.

In addition to simple variable replacement, you can use control flow structures like `if` and `unless` to conditionally render parts of a message for specific recipients.

```bash
curl -X POST 'https://comms.twilio.com/v1/Messages' \
--header 'Content-Type: application/json' \
--data '{
   "from": {
       "address": "<Your Purchased Twilio Phone Number>",
       "channel": "SMS"
   },
   "to": [
       {
           "address": "+15558675310",
           "channel": "PHONE",
           "variables": {
               "name": "Fred",
               "favoriteColor": "grey"
           }
       },
       {
           "address": "+15558675311",
           "channel": "PHONE",
           "variables": {
               "name": "Sonny",
               "favoriteColor": "red"
           }
       }
   ],
   "content": {
       "text": "Hello {{name | default: 'there'}}! {% if favoriteColor == '\''red'\''%} My favorite color is {{favoriteColor}} too! {% endif %}"
   }
}' \
-u $TWILIO_API_KEY:$TWILIO_API_SECRET
```

## Next steps

To deliver engaging media-rich messages, see [Rich Content](/docs/bulk-messaging/rich-content).
