API for sending emails
📬 The Send Api, version 2.0
Got a message to send? Our Sending Email API makes it quick and easy to fire off transactional or marketing emails to your audience, right from your app or backend.
Whether you're confirming a purchase, sending a welcome message, or saying “Hey, we miss you,” this API has your back.
🔐 Step 1: Get Your Api Key
Before anything else, you’ll need an Api key to authenticate your requests.
Already have one? Great! Copy it to your clipboard.
Need one? You can generate it by heading over to Settings → Api Keys → Create New Api Key.
📨 Step 2: Add Your Api Key to the Request Header
When you’re ready to make your request, add your Api key into the header like this:
x-api-key: xxxx-xxxx-xxxx-xxxx
📋 Copy
🚀 Step 3: Send a POST Request to this endpoint
You’ll be sending a POST request to:
https://inbound.messengeros.com/2.0/send
📋 Copy
This is where the magic happens ✨
🧱 Step 4: Build your Payload
4.1. Send emails using templates created in MessengerOS
Here’s the format your JSON payload should follow:Mandatory fields: email or phone_number.
{
"project": "xxxxxx-xxxxxx-xxxx-xxxxx-xxxxxxxxx", // optional (if missing, the default Project will be used), can be found in Settings / Projects / Edit / Show Api Key
"notification": {
"email": [
{
"delivery_provider": "xxxxxx-xxxxxx-xxxx-xxxxx-xxxxxxxxx", // optional (if missing, the default Delivery Channel (inside Project) will be used), can be found in Settings / Projects / Edit / Delivery Channel / Show Api Key
"template": "xxxxxx-xxxxxx-xxxx-xxxxx-xxxxxxxxx",
"attachments":[
{
"file_name":"test.pdf",
"file":"base64_encoded_file_content",
}
], // optional
"recipients": [
{
"email": "recipient@example.com",
"notification_origin_id": "xxxxxx", // a client generated unique id that we are going to use for webhooks, when sending back the status of the notification
"cc": ["email1@example.com","email2@example.com"],
"bcc": ["email3@example.com","email4@example.com"],
"distribution_lists": [
"xxxxxx-xxxxxx-xxxx-xxxxx-xxxxxxxxx"
], // optional, can be found in Audience / Lists / Edit / Show Api Key
"custom_info": [
{"key1": "value1"},
{"key2": "value2"},
{"key3": "value3"}
] // optional, will be found in Audience / Contacts / View
}
],
"params": [
{"FIRST_NAME": "Alex"},
{"APP_NAME": "my_assista"},
{"AMOUNT": "23"}
] // optional (if missing the default project will be used), can be found in Settings / Projects / Edit / Show Api Key
}
]
}
}
📋 Copy
4.2. Send emails using raw html code created in your platform
Here’s the format your JSON payload should follow:Mandatory fields: email or phone_number.
{
"project": "xxxxxx-xxxxxx-xxxx-xxxxx-xxxxxxxxx", // optional (if missing, the default Project will be used), can be found in Settings / Projects / Edit / Show Api Key
"notification": {
"email": [
{
"delivery_provider": "xxxxxx-xxxxxx-xxxx-xxxxx-xxxxxxxxx", // optional (if missing, the default Delivery Channel (inside Project) will be used), can be found in Settings / Projects / Edit / Delivery Channel / Show Api Key
"template": "xxxxxx-xxxxxx-xxxx-xxxxx-xxxxxxxxx",
"attachments":[
{
"file_name":"test.pdf",
"file":"base64_encoded_file_content",
}
], // optional
"recipients": [
{
"email": "recipient@example.com",
"notification_origin_id": "xxxxxx", // a client generated unique id that we are going to use for webhooks, when sending back the status of the notification
"cc": ["email1@example.com","email2@example.com"],
"bcc": ["email3@example.com","email4@example.com"],
"distribution_lists": [
"xxxxxx-xxxxxx-xxxx-xxxxx-xxxxxxxxx"
], // optional, can be found in Audience / Lists / Edit / Show Api Key
"custom_info": [
{"key1": "value1"},
{"key2": "value2"},
{"key3": "value3"}
] // optional, will be found in Audience / Contacts / View
}
],
"fromEmail": "john@sendingdomain.com",
"fromName": "Sender name",
"subject": "Subject line",
"preview_line": "Preview line",
"body": "Hello [first_name], please leave us a review",
"params": [
{"first_name":"Recipient's first name"}
] // optional
}
]
}
}
✅ Step 5: Get a Confirmation
If everything looks good and your JSON is valid, the Api will respond with:
{"status": "received"}
This means we’ve accepted the request and your subscriber is being processed in the background.
👀 Step 6: Double check in your Audience lists
Once your request goes through, head over to Emailing → Sent emails to confirm that your email has been sent to specified recipient.
That’s it! 🎉
Need help or want to test it out? Let us know, we’re always here to support.