Transactional Emails
This guide covers best practices for sending transactional emails with SendAPI — password resets, welcome emails, order confirmations, and similar critical communications.
What Are Transactional Emails?
Transactional emails are triggered by user actions (signing up, resetting a password, making a purchase) rather than marketing campaigns. They have:
- Higher priority — Users expect them immediately.
- Higher open rates — Typically 60–80% vs. 20% for marketing emails.
- Regulatory leniency — No opt-out/unsubscribe requirements in most jurisdictions.
Sending a Transactional Email
bash
curl -X POST https://sendapi.co/v1/email/send \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "alice@example.com",
"from": "noreply@yourdomain.com",
"subject": "Password Reset Request",
"html": "<h2>Reset Your Password</h2><p>Click <a href=\"https://yourapp.com/reset?token=abc123\">here</a> to reset your password. This link expires in 1 hour.</p>",
"text": "Reset your password by visiting: https://yourapp.com/reset?token=abc123"
}'Using Templates
For consistent branding, create reusable templates in the dashboard and reference them by ID:
bash
curl -X POST https://sendapi.co/v1/email/send \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "alice@example.com",
"from": "noreply@yourdomain.com",
"subject": "Welcome to YourApp!",
"template_id": "tpl_01H8xyz",
"variables": {
"first_name": "Alice",
"login_url": "https://yourapp.com/login"
}
}'Deliverability Tips
- Use a verified custom domain — Emails from your own domain (
@yourdomain.com) have significantly better inbox placement than shared domains. - Always include a
textfallback — Some email clients don't render HTML. - Keep emails focused — One purpose per email. Don't combine a welcome message with a marketing pitch.
- Monitor bounces — Hard bounces automatically suppress the address. Check the Tracking dashboard for delivery metrics.