Sending
Send Email
Sends a transactional or marketing email. Either templateId OR html/text content must be provided. If using a template, subject is optional.
POST
Authorizations
Bearer authentication header of the form Bearer
<token>, where <token> is your auth token.Body
Email data to sendRecipient email address and name
To send to multiple recipients, use the send bulk email
endpoint.
Cc Recipients array of email address and name object
Bcc Recipients array of email address and name object
The total combined recipients across
to, cc, and bcc cannot exceed 50 per email.Sender email address (must be from a verified domain) and name
Email subject line (max 998 characters). Required if not using templateId. Maximum length:
998
Example: "Welcome to Our Platform!"HTML content of the email. Required if not using templateId. Handlebars Template Variables:
Use Handlebars syntax for template variables in your HTML. Variables are wrapped in double curly
braces:
{{ variableName }}. Example: html <h1>Hello {{ firstName }}!</h1> <p>Your order #{{ orderNumber }} has been shipped.</p> <p>Total: {{ orderTotal }}</p> Provide the values for these variables in the dynamicData field. Example: jsx html: " <p>Hello {{ firstName }}! Sending this email via AutoSend.</p>" Key-value pairs for template variable substitution (Handlebars syntax)Example:
Plain text version of the email Example:
"Welcome! Thanks for signing up."ID of the email template to use. Required if not providing html/text. Example:
"A-abc123"Reply-to email address and name
ID of the unsubscribe group Example:
"unsub_group_123"Enable or disable click tracking for links in the email. When enabled, links are rewritten so clicks can be tracked. If omitted, the project-level setting configured in your AutoSend dashboard is used.Example:
falseEnable or disable open tracking for the email. When enabled, a tracking pixel is added to record opens. If omitted, the project-level setting configured in your AutoSend dashboard is used.Example:
falseCustom email headers to include with the message as key-value pairs.Example:
- Maximum 20 custom headers per email.
- Header names must match
^[A-Za-z0-9-]{1,76}$(ASCII letters, digits, and hyphens, up to 76 characters). - Header values can be up to 1000 characters.
- Reserved headers managed by AutoSend or the underlying mail transport cannot be overridden, including:
From,To,Cc,Bcc,Subject,Date,Message-ID,Return-Path,Sender,Reply-To,Received,DKIM-Signature,MIME-Version,Content-Type,Content-Transfer-Encoding,List-Unsubscribe,List-Unsubscribe-Post,X-SES-Configuration-Set, andX-SES-Message-Tags.
Filename and content of attachments.Example:
Maximum 20 files can be attached to an email. The total size of the email should be max 40MB after Base64 encoding of the attachments.
When set to
true, the email is delivered even if the recipient has unsubscribed from all groups or is on your suppression list. Reserve this for critical transactional emails that a recipient must receive regardless of their marketing preferences, such as one-time passwords, security alerts, and account verifications.Response
Email queued successfullyIndicates if the request was successful Example:
true