Sends a transactional or marketing email. Either templateId OR html/text content must be provided. If using a template, subject is optional.
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
}
}
Documentation Index
Fetch the complete documentation index at: https://docs.autosend.com/llms.txt
Use this file to discover all available pages before exploring further.
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
}
}
<token>, where <token> is your auth token.Show child attributes
"[email protected]""Jane Smith"Show child attributes
"[email protected]""Cc User Name"Show child attributes
"[email protected]""Bcc User Name"Show child attributes
"[email protected]""Your Company"998Example: "Welcome to Our Platform!"{{variableName}}.
Example:<h1>Hello {{firstName}}!</h1>
<p>Your order #{{orderNumber}} has been shipped.</p>
<p>Total: {{orderTotal}}</p>
dynamicData field.Example:html: "<p>Hello {{firstName}}! Sending this email via AutoSend.</p>"
dynamicData: {
"name": "Jane",
"firstName": "Jane",
"orderNumber": "ORD-12345",
"orderTotal": "$99.99"
}
"Welcome! Thanks for signing up.""A-abc123"Show child attributes
"[email protected]""John Doe"{
"name": "Jane",
"firstName": "Jane",
"orderNumber": "ORD-12345",
"orderTotal": "$99.99"
}
"unsub_group_123"Show child attributes
"attachment.pdf"Show all supported types
.adp .app .asp .bas .bat
.cer .chm .cmd .com .cpl
.crt .csh .der .exe .fxp
.gadget .hlp .hta .inf .ins
.isp .its .js .jse .ksh
.lib .lnk .mad .maf .mag
.mam .maq .mar .mas .mat
.mau .mav .maw .mda .mdb
.mde .mdt .mdw .mdz .msc
.msh .msh1 .msh2 .mshxml .msh1xml
.msh2xml .msi .msp .mst .ops
.pcd .pif .plg .prf .prg
.reg .scf .scr .sct .shb
.shs .sys .ps1 .ps1xml .ps2
.ps2xml .psc1 .psc2 .tmp .url
.vb .vbe .vbs .vps .vsmacros
.vss .vst .vsw .vxd .ws
.wsc .wsf .wsh .xnkattachments: [
{
"fileName": "attachment.pdf",
"content": "base64-encoded-content",
"contentType": "application/pdf"
}
]
truecurl --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
}
}