Skip to main content
POST
/
mails
/
bulk
curl --request POST \
--url https:/api.autosend.com/v1/mails/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"recipients": [
{
"email": "[email protected]",
"name": "Jane Smith"
},
{
"email": "[email protected]",
"name": "John Doe"
}
],
"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": "Valued Customer"
},
"replyTo": {
"email": "[email protected]"
}
}'
{
  "success": true,
  "data": {
    "batchId": "ae22c1e0-2022-4f6b-bdca-ce94901fbc6e",
    "totalRecipients": 1,
    "successCount": 1,
    "failedCount": 0
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Email data to send to multiple recipients

recipients
object[]
required

Array of recipient email addresses and names (maximum 100 recipients)

Required array length: 1 - 100 elements
from
object
required

Sender email address (must be from a verified domain) and name

subject
string

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.

Example:

"<h1>Welcome, {{name}}!</h1><p>Thanks for signing up.</p>"

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:

"tmpl_abc123"

replyTo
object

Reply-to email address and name

unsubscribeGroupId
string

ID of the unsubscribe group

Example:

"unsub_group_123"

dynamicData
object

Key-value pairs for template variable substitution (Handlebars syntax). Same data will be used for all recipients.

Example:
{
"name": "Valued Customer",
"firstName": "Valued",
"orderNumber": "ORD-12345",
"orderTotal": "$99.99"
}

Response

200 - application/json

Bulk send completed

success
boolean

Indicates if the request was successful

Example:

true

data
object