Domains
Add your own domain to send and receive as you@yourcompany.com. Custom domains are included in the free plan.
Add a domain
curl -X POST https://api.mailbay.dev/v1/domains \
-H "Authorization: Bearer $MAILBAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "acme.com"}'Mailbay detects your DNS host from the domain's nameservers and answers with the records it needs. Agents can do the same with the MCP tool add_domain.
DNS records
| Type | Name | Value |
|---|---|---|
| MX | acme.com | 10 mx1.mailbay.dev, 20 mx2.mailbay.dev |
| TXT | acme.com | v=spf1 include:_spf.mailbay.dev ~all |
| TXT | mb1._domainkey.acme.com | v=DKIM1; k=rsa; p=MIIBIjANBgkq… |
| TXT | _dmarc.acme.com | v=DMARC1; p=none; rua=mailto:… |
| CNAME | bounce.acme.com | bounce.mailbay.dev |
MX receives mail. SPF and DKIM let receivers trust mail you send. DMARC tells them what to do when a check fails. The bounce CNAME routes bounces back to us so we can suppress bad addresses.
One click setup
If your domain is on Vercel or Cloudflare, Mailbay writes the records for you with a token you provide, used once and never stored. Everywhere else, copy the records and the dashboard checks each one live.
Verify
curl -X POST https://api.mailbay.dev/v1/domains/{id}/verify \
-H "Authorization: Bearer $MAILBAY_API_KEY"We check each record against your authoritative nameservers. A domain is pending until every record matches, then verified. If a record later disappears, it becomes failing and the fix names the record. Pending domains are rechecked every 30 seconds for 10 minutes, then hourly for 72 hours.
Domains that already receive mail
agents.acme.com instead and keep your current mail untouched.