Robust Email has two APIs:
- The email API (
/api/v2) sends individual emails from your app: receipts, sign-in links, alerts. Authenticate with an API key (rb_live_…orrb_test_…). - The marketing API (
/api/v1) manages lists, contacts and campaigns. See Marketing API.
Send your first email
Base URL: https://robustemail.com/api/v2
const res = await fetch("https://robustemail.com/api/v2/emails", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ROBUSTEMAIL_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": "order-1042",
},
body: JSON.stringify({
from: "Acme <orders@acme.com>",
to: "jane@example.com",
subject: "Order #1042 confirmed",
html: "<p>Thanks for your order!</p>",
}),
});
const { id } = await res.json(); import os
import requests
res = requests.post(
"https://robustemail.com/api/v2/emails",
headers={
"Authorization": f"Bearer {os.environ['ROBUSTEMAIL_API_KEY']}",
"Idempotency-Key": "order-1042",
},
json={
"from": "Acme <orders@acme.com>",
"to": "jane@example.com",
"subject": "Order #1042 confirmed",
"html": "<p>Thanks for your order!</p>",
},
)
print(res.json()["id"]) $ch = curl_init("https://robustemail.com/api/v2/emails");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ROBUSTEMAIL_API_KEY"),
"Content-Type: application/json",
"Idempotency-Key: order-1042",
],
CURLOPT_POSTFIELDS => json_encode([
"from" => "Acme <orders@acme.com>",
"to" => "jane@example.com",
"subject" => "Order #1042 confirmed",
"html" => "<p>Thanks for your order!</p>",
]),
]);
$email = json_decode(curl_exec($ch), true); curl -X POST https://robustemail.com/api/v2/emails \
-H "Authorization: Bearer $ROBUSTEMAIL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{
"from": "Acme <orders@acme.com>",
"to": "jane@example.com",
"subject": "Order #1042 confirmed",
"html": "<p>Thanks for your order!</p>"
}' 200 OK {"id": "6adc79043cbea"}
New here? Start with the quickstart: it takes about five minutes with a test key.
Getting started
- Quickstart: your first email, from test key to live.
- Authentication: live and test keys, permissions and domain limits.
- Test mode and sandbox: simulate deliveries, bounces and complaints.
- Verify your domain: DKIM, SPF and DMARC.
API reference
- Send email · Send batch
- List emails · Retrieve email
- Domains · API keys
- Errors · Idempotency · Rate limits