Documentation

Domains & DNS

You send from domains you own and verify. Verification proves control and sets up SPF, DKIM and a return-path so mailboxes trust your mail.

Add a domain

Add a domain in the dashboard under Domains, or via the API:

cURL
curl -X POST https://app.mailstein.com/api/v1/domains \
  -H "Authorization: Bearer ms_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "name": "yourdomain.com" }'

The response includes the DNS records to add. Retrieve them any time with GET /v1/domains/{id}.

DNS records

Add these at your DNS provider as DNS-only records (not proxied). Exact values are shown per-domain in the dashboard.

TypePurpose
TXT (SPF)Authorizes mailstein's sending host to send for your domain.
TXT (DKIM)Publishes the public key that signs your mail (<selector>._domainkey).
CNAME (return-path)Aligned bounce/return-path so SPF and DMARC pass.
TXT (DMARC)Recommended policy at _dmarc.yourdomain.com.

Verify

Once the records propagate, verify:

cURL
curl -X PUT https://app.mailstein.com/api/v1/domains/dm_123/verify \
  -H "Authorization: Bearer ms_your_api_key"
DNS can take a few minutes to a few hours to propagate. Verification is safe to re-run; the domain flips to verified as soon as the records resolve. Only then will sends from that domain be accepted.