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>",
"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"
}
]
}
]
}
'{
"ok": true,
"data": {
"results": [
{
"index": 123,
"message_id": "<string>",
"status": "queued",
"error": {
"code": "validation_error",
"message": "<string>",
"retryable": true,
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"field": "to.email",
"code": "invalid_string",
"message": "<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>",
"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"
}
]
}
]
}
'{
"ok": true,
"data": {
"results": [
{
"index": 123,
"message_id": "<string>",
"status": "queued",
"error": {
"code": "validation_error",
"message": "<string>",
"retryable": true,
"param": "<string>",
"doc_url": "<string>",
"errors": [
{
"field": "to.email",
"code": "invalid_string",
"message": "<string>"
}
]
}
}
],
"summary": {
"total": 123,
"queued": 123,
"failed": 123
}
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}Documentation Index
Fetch the complete documentation index at: https://docs.sendmux.ai/llms.txt
Use this file to discover all available pages before exploring further.
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 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)
^eml_[a-z0-9]{24}$Result status
queued, failed Error details (only if failed)
Hide child attributes
Machine-readable error code
"validation_error"
Human-readable error description
True when the client may safely retry the same request. 429 and 5xx default true; 4xx default false.
Parameter that caused the error
Link to error documentation
Accumulated per-field issues (validation errors)
Was this page helpful?