How Emails are Structured for Sending via the /send Endpoint
The /send
endpoint accepts a JSON payload representing the email message. The
structure defines the envelope and content of the email, including sender,
recipient, subject, and body. A field called personalizations
optionally
allows you to specify unique content for each recipient of an email message.
Basic Structure
Here's a minimal template of the JSON structure:
{
"personalizations": [{}],
"from": {},
"subject": "",
"content": [
{
"type": "",
"value": ""
},
{
"type": "",
"value": ""
}
]
}
Field Types
personalizations
: Array of objects (recipient-specific data)from
: Object (sender information)subject
: Stringcontent
: Array of objects (email body parts)
Each content
object contains:
type
: String (e.g., "text/plain", "text/html")value
: String (actual content)
info
Detailed definitions of each field can be found in the API Reference Documentation