curl --request POST \
--url https://smtp.sendmux.ai/api/v1/emails/send/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"from": {
"email": "user@example.com",
"name": "John Smith"
},
"to": {
"email": "user@example.com",
"name": "John Smith"
},
"subject": "Welcome to SendMux",
"html_body": "<string>",
"text_body": "<string>",
"reply_to": {
"email": "user@example.com",
"name": "John Smith"
},
"return_path": "jsmith@example.com",
"cc": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"bcc": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"custom_headers": {},
"attachments": [
{
"filename": "invoice.pdf",
"content": "<string>",
"type": "application/pdf",
"encoding": "base64"
}
],
"idempotency_key": "<string>"
}
]
}
'{
"ok": true,
"data": {
"results": [
{
"index": 123,
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "validation_error",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
}
}
],
"summary": {
"total": 123,
"queued": 123,
"failed": 123
}
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}Queue up to 100 emails for delivery in a single request. Uses partial success model — individual message failures do not fail the entire batch. Requires email.send permission.
curl --request POST \
--url https://smtp.sendmux.ai/api/v1/emails/send/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"from": {
"email": "user@example.com",
"name": "John Smith"
},
"to": {
"email": "user@example.com",
"name": "John Smith"
},
"subject": "Welcome to SendMux",
"html_body": "<string>",
"text_body": "<string>",
"reply_to": {
"email": "user@example.com",
"name": "John Smith"
},
"return_path": "jsmith@example.com",
"cc": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"bcc": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"custom_headers": {},
"attachments": [
{
"filename": "invoice.pdf",
"content": "<string>",
"type": "application/pdf",
"encoding": "base64"
}
],
"idempotency_key": "<string>"
}
]
}
'{
"ok": true,
"data": {
"results": [
{
"index": 123,
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "validation_error",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>"
}
}
],
"summary": {
"total": 123,
"queued": 123,
"failed": 123
}
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}SendMux API key (smx_...)
Array of email messages to send (max 100)
1 - 100 elementsHide child attributes
Email subject line (max 998 chars, RFC 5322)
1 - 998^[^\r\n]*$"Welcome to SendMux"
HTML email content (max 10MB)
1 - 10485760Plain text alternative (max 10MB)
10485760Envelope sender for VERP support
254File attachments (max 10)
10Hide child attributes
Filename with allowed extension
1 - 255"invoice.pdf"
Base64-encoded file content
1MIME type override
"application/pdf"
base64 Prevents duplicate message processing (24h TTL)
1 - 255^[a-zA-Z0-9_-]+$Batch processed (check individual results for per-message status)
true Hide child attributes
Hide child attributes
Position in the input array
Message ID (null if failed)
Result status
queued, failed Error details (only if failed)
Hide child attributes
Was this page helpful?