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
Authorization uses the domain in from.email: either
messages:send:all or the matching domain-specific send role is
sufficient.
Authorizations
API key for authentication. Non-empty Security Requirement values are AhaSend API-key roles. Roles listed within one requirement object are jointly required; separate requirement objects are alternatives.
Headers
Optional idempotency key for safe request retries. Must be a unique string for each logical request.
An identical request with a completed stored outcome returns the original status and body. An in-progress
execution returns 409, a changed method/path/body returns 422, and a released 5xx execution may run again.
Keys for non-secret responses expire after 24 hours. API-key create responses include a one-time secret_key,
so successful encrypted replay responses for those operations expire after 5 minutes.
255Path Parameters
Account ID
Body
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
Plain text content. Required if html_content is empty
HTML content. Required if text_content is empty
AMP HTML content
File attachments. For inline images, set the attachment's content_id to a value wrapped in angle brackets (e.g. <image1@example.com>) and reference it from html_content with cid: (e.g. <img src="cid:image1@example.com">).
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
Retention settings for the message, overrides default account settings
Schedule for message delivery

