Skip to main content

Personalizations

The personalizations field is an array of objects that allows for customization of email properties on a per-recipient basis. This feature enables sending the same email to multiple recipients with individualized content and settings.

Structure

"personalizations": [
{
"to": [],
"cc": [],
"bcc": [],
"subject": "",
"headers": {},
"dkim_domain": "",
"dkim_private_key": "", // Base64 encoded
"dkim_selector": "",
"dynamic_template_data": {}
}
]

Key Points

  • The to field is the only required property within each personalization object.
  • Properties like subject, from, and reply_to can be defined globally or within each personalization object.
  • When a property is defined both globally and in a personalization object, the personalized value takes precedence.

Example: Multiple Recipients with Custom Subjects

"personalizations": [
{
"to": [{ "email": "banana-lover123@example.com" }],
"subject": "BANANAS ARE ON SALE"
},
{
"to": [{ "email": "apple-lover123@example.com" }],
"subject": "APPLES ARE ON SALE"
}
]

This structure allows for:

  • Sending to multiple recipients
  • Customizing subject lines per recipient
  • Applying different headers or DKIM settings per email
info

DKIM fields (i.e. dkim_domain, dkim_private_key, dkim_selector) and Email Template fields (i.e. dynamic_template_data) will be covered in separate sections.

By leveraging personalizations, you can create highly targeted and individualized email campaigns within a single API call.