Quickstart
From nothing to a sent email in two minutes: create a key, verify a domain, POST one JSON body.
The sending API is a single authenticated endpoint — POST https://api.mail.atrix.dev/v1/emails. Here is the whole loop.
1. Create an API key
In the dashboard, open Settings → API keys → Create key. Give it the email.send scope (add emails.read if you also want to look up delivery status). The full key — beginning am_live_ — is shown once; store it in a secret manager or an environment variable.
export ATRIX_MAIL_KEY="am_live_..." # shown once, at creation
2. Verify a sending domain
You can only send from a domain your organization has verified. Add one under Domains and publish the DNS records we generate — see Domains for the full record set (MX, SPF, DKIM, DMARC, MTA-STS). Sending is enabled once the domain is active.
3. Send your first email
curl -X POST https://api.mail.atrix.dev/v1/emails \ -H "Authorization: Bearer $ATRIX_MAIL_KEY" \ -H "Content-Type: application/json" \ -d '{ "from": "Yourco <hello@yourco.com>", "to": ["ava@client.io"], "subject": "Hello from Atrix Mail", "html": "<p>It works.</p>", "text": "It works." }'
A 201 Created comes back with the message id. queued means we accepted it; delivery is asynchronous.
{ "id": "6f6d2b1a-3c9e-4a51-8f2b-2d7c1a0e9b44", "status": "queued" }
Same thing with the SDK
The TypeScript SDK wraps the same endpoint with full types:
bun add @atrix-mail/sdk
import { AtrixMail } from "@atrix-mail/sdk"; const mail = new AtrixMail(process.env.ATRIX_MAIL_KEY!); const { id, status } = await mail.emails.send({ from: "Yourco <hello@yourco.com>", to: "ava@client.io", subject: "Hello from Atrix Mail", html: "<p>It works.</p>", text: "It works.", }); console.log(id, status); // "<uuid>" "queued"
What next
- Track what happens after
queuedwith webhooks — deliveries, bounces, complaints. - Understand keys and scopes.
- Read the full request and error reference.