Send email from your own domain, and host mailboxes on it. Both start the same way: add the domain, publish its DNS records, verify. Sending is on Pro and Teams; mailboxes come with Teams (pricing).
1. Add a mail domain
curl -X POST $API/{slug}/mail/domains \ -H "X-API-Key: $KEY" \ -d '{"domain":"mycompany.com"}'
Response includes the DNS records you need to publish — MX, SPF, DKIM, DMARC.
2. Publish DNS records
Add the returned records at your DNS host (Cloudflare, Route53, Namecheap, whatever). Then verify:
curl -X POST $API/{slug}/mail/domains/mycompany.com/verify \ -H "X-API-Key: $KEY"
Send email
Invites, notifications, password resets: send from any verified mail domain of the project. No mailbox needed, and every message is DKIM-signed.
# 202 = accepted for delivery curl -X POST $API/{slug}/mail/send \ -H "X-API-Key: $KEY" \ -d '{ "to": ["client@example.com"], "subject": "Your invite", "html": "<p>You are invited!</p>", "text": "You are invited!", "from_addr": "no-reply@mycompany.com", "from_name": "MyCompany", "reply_to": "support@mycompany.com" }' # -> {"message_id": "<uuid@mycompany.com>", "accepted": 1, "refused": [], "remaining_today": 299} # Send log: counts only, recipient addresses are not stored curl "$API/{slug}/mail/sends?limit=50" -H "X-API-Key: $KEY"
from_addris optional and defaults tono-reply@your first verified domain. Its domain must be a verified mail domain of the project; the part before the @ is up to you.- Up to 25 recipients per call across
to,ccandbcc;htmlplustextup to 256 KB, at least one of them required. - Daily caps count recipients: Pro 300 a day, Teams 3,000. Over the cap returns
429withresets_at(midnight UTC). Refused recipients are listed inrefusedand don't count. - Errors:
400validation or no verified domain,402plan without sending,403unverified from domain,429daily cap,502rejected by the mail server.
3. Create mailboxes
curl -X POST $API/{slug}/mail/accounts \ -H "X-API-Key: $KEY" \ -d '{ "email": "hello@mycompany.com", "password": "securepass", "display_name": "Hello" }'
Access the mailbox
- IMAP —
mail.mosaic.site:993SSL, sign in with the account email + password - SMTP —
mail.mosaic.site:465SSL, same credentials
List + stats
curl $API/{slug}/mail/accounts -H "X-API-Key: $KEY" curl $API/{slug}/mail/stats -H "X-API-Key: $KEY"
Endpoints
| Endpoint | Method | Description |
|---|---|---|
| /{slug}/mail/domains | GET POST | List / add mail domains |
| /{slug}/mail/domains/{domain} | GET DEL | Detail / remove |
| /{slug}/mail/domains/{domain}/verify | POST | Verify DNS |
| /{slug}/mail/domains/{domain}/dns | GET | Check DNS status |
| /{slug}/mail/accounts | GET POST | List / create accounts |
| /{slug}/mail/accounts/{email} | GET PATCH DEL | Account CRUD |
| /{slug}/mail/send | POST | Send from a verified domain |
| /{slug}/mail/sends | GET | Send log (paginated) |
| /{slug}/mail/stats | GET | Usage statistics |