Before MailAPI can route mail for a domain, publish the DNS records returned by domain provisioning and verify them in the dashboard or via API polling.
Developer Documentation
DNS Verification
DNS setup and verification for root domains and subdomains.
Provision a domain
curl --fail-with-body --silent --show-error \
-X POST "$APP_URL/api/v1/create/domain" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Domain": "example.com",
"Params": {
"total_mailbox_allowed": 100
}
}'
Poll the task until status is completed:
curl -H "Authorization: Bearer $API_KEY" \
"$APP_URL/api/v1/get/domain?task_id=101"
When complete, the response includes DNS records for your domain.
Record types
MailAPI typically returns:
- MX — inbound mail routing target
- TXT — domain verification token
- A — mail-host address for SMTP/IMAP routing
Add these records at your DNS host exactly as returned by the API.
Verify in the dashboard
- Open the domain in Domains.
- Publish the returned records at your DNS provider.
- Click Verify DNS after propagation.
Root domains generally require MX, TXT, and mail-host A checks. Subdomains may require MX verification only.
SPF, DKIM, and DMARC
MailAPI provides MX and mail-host records for routing. Configure SPF, DKIM, and DMARC with your outbound SMTP provider separately to improve deliverability.
Next steps: Getting started · API docs