Create Message
Creates and sends a message to one or more recipients. This API cannot be used if you want to send a conversational/P2P message and set CC or BCC. Use Create Conversation Message instead.
Validation Requirements:
- Either
text_contentorhtml_contentis required from.emailmust be from a domain you own with valid DNS recordsretention.metadatamust be between 1 and 30 daysretention.datamust be between 0 and 30 days- If
reply_tois provided, do not includereply-toin headers message-idheader will be ignored and automatically generated- Schedule times must be in RFC3339 format
schedule.first_attemptmust be in the future and within 7 days of the requestschedule.expiresmust be in the future and within 8 days of the request
Authorizations
API key for authentication
Headers
Optional idempotency key for safe request retries. Must be a unique string for each logical request. Requests with the same key will return the same response. Keys expire after 24 hours.
255Path Parameters
Account ID
Body
{
"email": "noreply@example.com",
"name": "Example Corp"
}This does not set the To header to multiple addresses, it sends a separate message for each recipient
1 - 100 elementsEmail subject line
If provided, the reply-to header in headers array must not be provided
{
"email": "noreply@example.com",
"name": "Example Corp"
}Plain text content. Required if html_content is empty
HTML content. Required if text_content is empty
AMP HTML content
File attachments
Custom email headers. reply-to header cannot be provided if reply_to is provided, message-id will be ignored and automatically generated
Global substitutions, recipient substitutions override global
Tags for categorizing messages
If true, the message will be sent to the sandbox environment
The result of the sandbox send
deliver, bounce, defer, fail, suppress Tracking settings for the message, overrides default account settings
{ "open": true, "click": true }Retention settings for the message, overrides default account settings
{ "metadata": 1, "data": 0 }Schedule for message delivery

