Skip to main content
POST
/
mails
/
send
curl --request POST \
  --url https://api.autosend.com/v1/mails/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "to": {
    "email": "[email protected]",
    "name": "Jane Smith"
  },
  "cc": [
      {"email": "[email protected]", "name": "CC User 1"},
      {"email": "[email protected]", "name": "CC User 2"}
    ],
  "bcc": [{"email": "[email protected]"}],
  "from": {
    "email": "[email protected]",
    "name": "Your Company"
  },
  "subject": "Welcome to Our Platform!",
  "html": "<h1>Welcome, {{name}}!</h1><p>Thanks for signing up.</p>",
  "dynamicData": {
    "name": "Jane"
  },
  "replyTo": {
    "email": "[email protected]"
  }
}'
{
	"success": true,
	"data": {
		"emailId": "698afb75ff4bc5466e3a797a",
		"message": "Email queued successfully.",
		"totalRecipients": 1
	}
}
curl --request POST \
  --url https://api.autosend.com/v1/mails/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "to": {
    "email": "[email protected]",
    "name": "Jane Smith"
  },
  "cc": [
      {"email": "[email protected]", "name": "CC User 1"},
      {"email": "[email protected]", "name": "CC User 2"}
    ],
  "bcc": [{"email": "[email protected]"}],
  "from": {
    "email": "[email protected]",
    "name": "Your Company"
  },
  "subject": "Welcome to Our Platform!",
  "html": "<h1>Welcome, {{name}}!</h1><p>Thanks for signing up.</p>",
  "dynamicData": {
    "name": "Jane"
  },
  "replyTo": {
    "email": "[email protected]"
  }
}'
{
	"success": true,
	"data": {
		"emailId": "698afb75ff4bc5466e3a797a",
		"message": "Email queued successfully.",
		"totalRecipients": 1
	}
}

Authorizations

Authorizations
string | header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

Email data to send
to
object
required
Recipient email address and name
To send to multiple recipients, use the send bulk email endpoint.
cc
object[]
Cc Recipients array of email address and name object
bcc
object[]
Bcc Recipients array of email address and name object
The total combined recipients across to, cc, and bcc cannot exceed 50 per email.
from
object
required
Sender email address (must be from a verified domain) and name
subject
string
required
Email subject line (max 998 characters). Required if not using templateId. Maximum length: 998 Example: "Welcome to Our Platform!"
html
string
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>"
dynamicData
object
Key-value pairs for template variable substitution (Handlebars syntax)Example:
dynamicData: {
  "name": "Jane",
  "firstName": "Jane",
  "orderNumber": "ORD-12345",
  "orderTotal": "$99.99"
}
text
string
Plain text version of the email Example: "Welcome! Thanks for signing up."
templateId
string
ID of the email template to use. Required if not providing html/text. Example: "A-abc123"
replyTo
object
Reply-to email address and name
unsubscribeGroupId
string
ID of the unsubscribe group Example: "unsub_group_123"
trackingClick
boolean
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: false
trackingOpen
boolean
Enable 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: false
headers
object
Custom email headers to include with the message as key-value pairs.
  • 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, and X-SES-Message-Tags.
Example:
headers: {
  "X-Entity-Ref-ID": "order-12345",
  "X-Campaign-ID": "welcome-series"
}
attachments
object[]
Filename and content of attachments.
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.
Example:
attachments: [
  {
    "fileName": "attachment.pdf",
    "content": "base64-encoded-content",
    "contentType": "application/pdf"
  }
]
bypassSuppressions
boolean
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.
Use this flag sparingly and only for genuinely essential messages. Sending to suppressed or bounced addresses drives up your bounce rate, and a high bounce rate can place your account under review or affect your sending reputation.

Response

Email queued successfully
success
boolean
Indicates if the request was successful Example: true
data
object