Personalize your Create and Send messages
Create and Send supports personalization using Handlebars.
When using Create and SendA way to target recipients of a single channel type by providing a list of user identifiers when creating a message. You can send to Channel IDs, email addresses, phone numbers, or Open channel addresses. Unknown identifiers are registered as new email, SMS, and Open channels., you can personalize values directly in the create_and_send
array, or you can include in your CSV data additional properties that you want to use to personalize messages — any column name or property that is not prefaced with ua_
. Use {{column_name}}
or {{property_name}}
in the body of the message.
If you want to personalize your message using both Attributes and information from a CSV, make sure that the properties in the CSV are unique from your Attributes. If an Attribute has the same name as a property in the CSV, Airship will try to use the value in the CSV. See Object and Array Notation for Create and Send for using complex arrays and objects.
POST /api/create-and-send HTTP/1.1
Authorization: Basic <master authorization string>
Accept: application/vnd.urbanairship+json; version=3
Content-Type: application/json
{
"audience": {
"create_and_send": [
{
"ua_msisdn": "15551234567",
"ua_sender": "12345",
"ua_opted_in": "2021-04-29T10:34:22",
"name": "New Customer, Esq.",
"from_city": "City",
"from_state": "OR"
}
]
},
"device_types": [
"SMS"
],
"notification": {
"sms": {
"alert": "Hi {{name}}! I hear you're from {{from_city}}, {{from_state}}!",
"expiry": 172800
}
}
}
Categories