Domains
You send from domains you own. Adding one generates a unique record set; publishing it and passing verification flips the domain to active.
Domain, mailbox, and webhook management is done in the dashboard, which is session-authenticated (not via an API key). This page documents what those endpoints return so you know exactly which DNS records to publish and what “verified” means. The hosting-oriented walkthrough, with registrar tips, lives on the DNS setup page.
Add a domain
Adding a domain (POST /domains) creates it in pending status and returns the DNS records to publish. A DKIM key pair is generated for the domain shortly after, adding its record to the set. An optional catch_all_target forwards mail sent to any unmatched address on the domain.
// POST /domains → 201 { "domain": { "id": "…", "domain": "yourco.com", "status": "pending", "is_send_enabled": true, "is_receive_enabled": true, "verified_at": null }, "dns_records": [ /* the records below */ ] }
DNS records
Publish these at your DNS host, exactly as given. Substitute your own domain for yourco.com; the verification token and DKIM selector are unique to your domain (copy them from the dashboard).
| Type | Name | Value | Purpose |
|---|---|---|---|
| MX | yourco.com | 10 mx1.mail.atrix.dev. | Routes inbound mail to us. |
| TXT | yourco.com | v=spf1 include:mail.atrix.dev ~all | SPF — authorises our servers to send for you. |
| TXT | _atrixmail.yourco.com | atrix-mail-verify=<token> | Ownership verification. |
| TXT | <selector>._domainkey.yourco.com | Your DKIM public key | DKIM — cryptographically signs outbound mail. |
| TXT | _dmarc.yourco.com | v=DMARC1; p=none; rua=mailto:dmarc@mail.atrix.dev | DMARC policy + aggregate reports. |
Recommended (not required for activation) — MTA-STS and TLS-RPT enforce TLS on inbound mail to your domain and collect TLS reports:
| Type | Name | Value |
|---|---|---|
| CNAME | mta-sts.yourco.com | mta-sts.mail.atrix.dev. |
| TXT | _mta-sts.yourco.com | v=STSv1; id=atrixmail1 |
| TXT | _smtp._tls.yourco.com | v=TLSRPTv1; rua=mailto:tls-reports@mail.atrix.dev |
p=none so nothing is quarantined while you confirm alignment — tighten it to quarantine or reject at your registrar once reports look clean.Verify
Verification runs automatically every few minutes. To trigger an immediate re-check, call POST /domains/:id/verify (rate limited to once per 30 seconds per domain). Each record moves from pending to ok (or mismatch) as it propagates; the domain flips to active when the required records pass. A domain.verified webhook fires when it does.
You can check propagation yourself:
dig MX yourco.com +short # expect: 10 mx1.mail.atrix.dev. dig TXT yourco.com +short # expect a line containing: v=spf1 include:mail.atrix.dev ~all
Health grade
GET /domains/:id/health returns the record set plus a grade summarising deliverability posture:
| Grade | Meaning |
|---|---|
| excellent | Every record verified. |
| good | MX and DKIM verified; some optional records still pending. |
| issues | At least one published record does not match what we expect. |
| pending | Nothing has verified yet. |
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /domains | Add a domain; returns the DNS records. |
| GET | /domains | List your domains. |
| GET | /domains/:id | One domain and its records. |
| GET | /domains/:id/health | Records + deliverability grade. |
| POST | /domains/:id/verify | Request an immediate re-check. |
| DELETE | /domains/:id | Remove a domain (delete its mailboxes first). |
am_live_ API key. The API-key surface is sending only — see Authentication.