Transactional Email API
Send one-to-one transactional app mail through S10/Mail: login links, password resets, verification codes, team invites, receipts, and system alerts.
Every transactional email is sent directly from your own verified domain over an HTTPS API, delivered in seconds, with links untouched (no tracking redirects) and no marketing unsubscribe footers.
1. Quick Start
1.1 Prerequisites
- Verified Domain: Verify your sending domain under Settings → Domains (e.g.
notify.yourdomain.comoryourdomain.com). - API Key: Generate a key under Transactional → API Keys (or Settings → API Keys). Live keys begin with
s10_live_; test keys begin withs10_test_.
1.2 First Send with cURL
curl -X POST https://mail.spen10.com/api/v1/emails \
-H "Authorization: Bearer s10_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"from": "auth@yourdomain.com",
"to": "user@example.com",
"subject": "Your verification code",
"html": "<p>Your one-time code is <strong>123456</strong>.</p>",
"text": "Your one-time code is 123456."
}'
Response:
{
"id": "e0b8e961-7132-47d9-bf2a-9e6be220f821",
"status": "sent",
"ses_message_id": "0100018f...-000000"
}
2. Sending with Node.js (fetch)
const response = await fetch("https://mail.spen10.com/api/v1/emails", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.S10_MAIL_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": `order-receipt-${order.id}`,
},
body: JSON.stringify({
from: "orders@yourdomain.com",
to: customer.email,
subject: `Order Receipt #${order.id}`,
html: `<p>Thank you for your order, ${customer.name}!</p>`,
}),
});
const data = await response.json();
console.log("Email sent with ID:", data.id);
3. API Reference
POST /api/v1/emails
Send a transactional email immediately.
Request Headers
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer s10_live_... or Bearer s10_test_... |
x-api-key |
string | Alternative to Authorization header |
Idempotency-Key |
string | Optional unique string (UUID or order/event ID). Repeated requests with the same key within 24 hours return the original result without sending twice. |
Content-Type |
string | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
from |
string | Yes | Sender address. Must use a verified domain in your workspace. |
to |
string | Yes | One recipient email address. Make one call per recipient. |
subject |
string | Conditional | Subject line. Required if not using a template. (Max 255 chars) |
html |
string | Conditional | HTML body. (Max 20 KB total payload) |
text |
string | Conditional | Plain text body. If omitted, generated automatically from HTML. |
template |
string | Optional | Template slug or UUID. If provided, subject and body are rendered from the template. |
data |
object | Optional | Key-value dictionary used to interpolate {{variable}} tags in templates. |
reply_to |
string | Optional | Reply-To address. |
headers |
object | Optional | Custom email headers (e.g. {"X-Entity-Ref-ID": "123"}). |
GET /api/v1/emails/:id
Retrieve delivery status and metadata for a sent message.
Response:
{
"id": "e0b8e961-7132-47d9-bf2a-9e6be220f821",
"to": "user@example.com",
"from": "auth@yourdomain.com",
"subject": "Your verification code",
"status": "delivered",
"ses_message_id": "0100018f...-000000",
"error": null,
"created_at": "2026-11-15T18:00:00Z"
}
Status values:
queued: Message accepted.sent: Handed off to AWS SES.delivered: Successfully accepted by recipient mail server.bounced: Message bounced (hard bounce suppresses future sends to that address).complained: Recipient marked message as spam.failed: SES rejected send or internal error occurred.
4. Templates & Dynamic Variables
Create reusable templates in the dashboard under Transactional → Templates with {{variable}} placeholders:
<p>Hello {{name}},</p>
<p>Your password reset token is: <code>{{token}}</code>.</p>
<p><a href="{{reset_url}}">Click here to reset your password</a></p>
Call with:
{
"from": "security@yourdomain.com",
"to": "alex@example.com",
"template": "password-reset",
"data": {
"name": "Alex",
"token": "489201",
"reset_url": "https://example.com/reset?token=489201"
}
}
5. Supabase Auth Integration Guide
You can use S10/Mail as your custom email provider in Supabase Auth using Supabase Auth Send Email Hook.
In your Supabase project under Authentication → Hooks:
- Enable Send Email Hook (HTTP Hook).
- Set Hook URL:
https://mail.spen10.com/api/v1/emails - Set Secret / Header:
Authorization: Bearer s10_live_YOUR_KEY - Or configure an Edge Function that receives the Supabase hook payload and forwards it to
POST /api/v1/emailswith your template of choice.
6. Retention & Privacy Policy
- 72-Hour Body Retention: To protect sensitive one-time credentials, magic links, and tokens, email bodies are stored for 72 hours strictly for immediate debugging, after which they are permanently purged.
- Permanent Metadata: Recipient address, timestamp, subject line, status, and SES message ID remain permanently in your delivery log.
- Viewers Role: Workspace members with the
Viewerrole cannot inspect email bodies even during the 72-hour retention window.

