Transactional email
One-to-one product email — OTPs, password resets, receipts, alerts. Send via REST or drop-in SMTP. Sub-2-second median delivery on Gmail.
Two ways to send
Pick whichever fits your stack:
- REST API — recommended for new integrations. Full payload control, structured responses, easy to log and retry.
- SMTP relay — drop-in for WordPress, Drupal, any mail library. Point your existing app at
smtp.mailazy.com:587and you're sending in minutes.
Both paths share the same templates, logs, suppression list, deliverability monitoring and reputation — there is no penalty for picking one over the other.
REST API
Send by template slug (recommended)
POST /api/v1/send
{
"to": "alice@example.com",
"templateSlug": "password-reset",
"variables": {
"resetUrl": "https://app.acme.com/reset/abc123",
"expiresIn": "10 minutes"
}
} Variables substitute Handlebars placeholders in the template's subject and body. Unknown placeholders render as empty strings (not as the literal {{var}}).
Send inline (one-off)
POST /api/v1/send
{
"to": "alice@example.com",
"subject": "Order #4729 shipped",
"html": "<p>Your order is on the way.</p>"
} Inline sends skip the template pipeline but still respect suppressions, write logs, and emit webhooks.
Response
200 OK
{
"messageId": "msg_01HXAB...",
"status": "queued",
"to": "alice@example.com",
"templateSlug": "password-reset",
"templateVersion": 4
} The queue typically drains within a second; track final status via webhooks or GET /api/v1/logs/{messageId}.
SMTP relay
Use any SMTP library — node-mailer, PHPMailer, Spring's JavaMailSender, etc. Point it at:
| Setting | Value |
|---|---|
| Host | smtp.mailazy.com |
| Port | 587 (STARTTLS) or 465 (SSL) |
| Username | your X-API-Key |
| Password | your X-API-Secret |
| From address | any verified domain on your account |
Standard SMTP headers are honored. To trigger a saved template via SMTP, add a custom header:
X-Mailazy-Template: welcome
X-Mailazy-Variables: {"name":"Alice","plan":"pro"} Webhooks
Subscribe to delivery events to update your database in real time. One subscription per product, one endpoint URL, fan out by event type on your side.
Subscribe
POST /api/v1/webhooks
{
"url": "https://app.acme.com/mailazy/webhook",
"events": ["delivered", "opened", "clicked", "bounced", "complained", "unsubscribed"]
} Payload
POST https://app.acme.com/mailazy/webhook
X-Mailazy-Signature: t=1747008000,v1=<sha256-hmac>
{
"event": "delivered",
"messageId": "msg_01HXAB...",
"to": "alice@example.com",
"templateSlug": "password-reset",
"timestamp": "2026-05-12T10:00:00Z",
"data": { "smtpResponse": "250 OK" }
} Verify the signature with HMAC-SHA256 of the raw body using your webhook secret (shown once at subscription creation). Webhooks retry with exponential backoff for 24h on any non-2xx response.
Bring your own AWS SES
On Marketing tier and up, point Mailazy at your AWS SES account. We handle reputation monitoring, warm-up and the marketing layer; you pay AWS directly for sends. Typical savings: 70–90% vs legacy ESPs at 1M+ volume.
Configure under Settings → SMTP in the dashboard. Once your SES credentials are saved and verified, all sends route through SES — REST and SMTP relay both transparently use it.
Deliverability defaults
- SPF, DKIM and DMARC alignment enforced on every send. Misaligned domains return 422 at API time, not silent bounces.
- Rotational DKIM — keys rotate every 90 days automatically.
- Bounce filtering — hard bounces auto-suppress the recipient after one failure; soft bounces retry on managed schedule.
- RFC 8058 one-click unsubscribe — the
{{> unsubscribe-footer}}partial includesList-Unsubscribe-Postheaders automatically.
Rate limits
Per-product limits, applied across REST + SMTP combined:
- Free tier:
10 req/s,10,000 sends/month. - Marketing tier:
100 req/s,1,000,000 sends/month included. - Scale tier: custom, contact sales.
Exceeding returns 429 Too Many Requests with a Retry-After header. The client SDKs back off automatically.