curl --request POST \
--url https://email-api.mailercloud.com/email \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"email": {
"from": "from@example.com",
"fromName": "John Doe",
"replyTo": [
"replyto@example.com"
],
"subject": "HTML Email Example",
"text": "This is the plain text version of the email.",
"html": "<html><body><h1>HTML Body</h1><p>Hello, this is an HTML email.</p></body></html>",
"recipients": {
"to": [
{
"name": "Recipient One",
"email": "recipient1@example.com"
},
{
"name": "Recipient Two",
"email": "recipient2@example.com"
}
],
"cc": [
"cc1@example.com",
"cc2@example.com"
],
"bcc": [
"bcc1@example.com"
]
},
"attachments": [
{
"name": "file1.pdf",
"url": "https://example.com/file1.pdf"
},
{
"name": "image.png",
"url": "https://example.com/image.png"
}
]
},
"metadata": {
"campaignType": "transactional",
"timestamp": "2025-08-25T10:00:00Z",
"messageId": "order-10482-confirmation",
"custom": {
"inbox_tracking": "true",
"campaign_id": "example-campaign-id"
}
},
"version": "1.0"
}
'{
"status": "SUCCESS",
"statusCode": 1000,
"message": "NA"
}{
"status": "ERROR",
"statusCode": 9022,
"message": "Unsupported version",
"supportedVersion": "1.0 or 2.0"
}Send Email
Send a single email — transactional (order confirmations, OTPs, notifications) or promotional — through the Mailercloud Email API. Supports plain text, HTML, AMP content, attachments, and multiple recipients (To, CC, BCC).
Key points:
from(andreplyTo) must belong to a verified sender on your account.- Set
versionto"1.0"for HTML-only sends, or"2.0"when includingamp_html. - Provide both
htmlandtextfor the best deliverability. - Attachments are fetched at send time from a publicly accessible
url. - Set
metadata.messageIdto your own unique id (a UUID).
Need per-recipient personalization (Hi {{first_name}}…) in one request? Use Send Personalized Email (mail merge) — same request structure plus merge_vars.
POST
/
email
curl --request POST \
--url https://email-api.mailercloud.com/email \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"email": {
"from": "from@example.com",
"fromName": "John Doe",
"replyTo": [
"replyto@example.com"
],
"subject": "HTML Email Example",
"text": "This is the plain text version of the email.",
"html": "<html><body><h1>HTML Body</h1><p>Hello, this is an HTML email.</p></body></html>",
"recipients": {
"to": [
{
"name": "Recipient One",
"email": "recipient1@example.com"
},
{
"name": "Recipient Two",
"email": "recipient2@example.com"
}
],
"cc": [
"cc1@example.com",
"cc2@example.com"
],
"bcc": [
"bcc1@example.com"
]
},
"attachments": [
{
"name": "file1.pdf",
"url": "https://example.com/file1.pdf"
},
{
"name": "image.png",
"url": "https://example.com/image.png"
}
]
},
"metadata": {
"campaignType": "transactional",
"timestamp": "2025-08-25T10:00:00Z",
"messageId": "order-10482-confirmation",
"custom": {
"inbox_tracking": "true",
"campaign_id": "example-campaign-id"
}
},
"version": "1.0"
}
'{
"status": "SUCCESS",
"statusCode": 1000,
"message": "NA"
}{
"status": "ERROR",
"statusCode": 9022,
"message": "Unsupported version",
"supportedVersion": "1.0 or 2.0"
}Authorizations
Your Mailercloud API key (plain text, no Bearer prefix). Create keys in Settings → API.
Headers
Request body type
Body
application/json
The message payload.
Show child attributes
Show child attributes
Use 1.0 when only html is sent. Use 2.0 when amp_html is included.
Available options:
1.0, 2.0 Optional metadata recorded with the message. Always set messageId if you need to track delivery or reconcile webhook events.
Show child attributes
Show child attributes