Register once
Each project gets a matching @atbas.xyz sender, a Stalwart mailbox, and a revocable send-only token from the admin panel.
One HTTPS endpoint to send a login OTP or a sanitised generic message. Each project gets a sender identity, a mailbox and a revocable token.
This service delivers mail. It does not generate, store or verify OTP codes — each project owns its own auth logic and passes the code in.
POST /v1/send
Bearer $EMAIL_API_TOKEN
Why it exists
Stop embedding provider credentials and reinventing templates, rate limiting and auditing.
Each project gets a matching @atbas.xyz sender, a Stalwart mailbox, and a revocable send-only token from the admin panel.
Outbound SMTP is blocked on ports 25, 465 and 587. The HTTPS API is the only path that works — and the right one for an OTP.
Named templates, sanitised generic mail, per-project quotas and a send log live here so every project does not build them again.
Admin panel
Register senders, inspect every attempt, preview templates and watch the shared allowance. Volume and tokens stay behind /admin.
Register a sender, mint or revoke tokens, restrict callers by IP, set the daily quota, and create or retry the matching mailbox.
Every attempt, including refusals. Per-attempt drawer, masked addresses, and a CSV export.
Live preview of named templates and a real test send against a chosen project.
Shared monthly allowance, this-service volume, and last-24h deliverability.
How to send
Authenticate with a send-only token that looks like es_…. A 202 Accepted response is { "id" } plus a provider delivery id. GET /v1/templates lists named templates.
{
"type": "template",
"to": "user@example.com",
"template": "otp",
"variables": {
"code": "482913",
"expiresInMinutes": 10,
"appName": "Your App"
}
}
{
"type": "generic",
"to": "user@example.com",
"subject": "Welcome aboard",
"html": "<p>Hello</p>",
"text": "Hello"
}
curl -X POST https://mail-api.atbas.xyz/v1/send \
-H "Authorization: Bearer $EMAIL_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"template","to":"user@example.com","template":"otp","variables":{"code":"482913","expiresInMinutes":10,"appName":"Your App"}}'
Scope
It can create the matching mailbox. It does not read or store inbox contents.
It does not generate, store or verify OTP codes.
Deliberately not Stalwart app passwords, which also grant IMAP read access.
Guardrails
Documented defaults. One shared monthly allowance across every project.
Delivered messages. Resets 00:00 UTC.
Burst guard, independent of the daily quota.
Across all projects, every 10 minutes.
Per minute, before the token is read.
Monthly ceiling for the whole service. Resend compatible.