Receiving Domains
Add and verify your own domain to receive email at addresses like hello@yourdomain.com, and route its traffic to your sender IDs.
By default, sender IDs receive on mailafrica.online. To receive at your own domain (e.g. orders@yourcompany.co.tz), add the domain and verify ownership with a DNS TXT record.
Add a receiving domain
curl -X POST https://api.mailafrica.online/api/inbound/domains \
-H "X-API-Key: MAIL_<your_api_key_here>" \
-H "Content-Type: application/json" \
-d '{"domain": "mail.yourcompany.co.tz"}'The response includes the verification record you must publish in DNS:
{
"success": true,
"data": {
"domain": "mail.yourcompany.co.tz",
"verification_record": {
"type": "TXT",
"host": "@",
"value": "mail-verify=<64-hex-chars>"
}
}
}Verify the domain
Add that TXT record at your DNS provider, then ask MailAfrica to check it:
curl -X POST https://api.mailafrica.online/api/inbound/domains/5/verify \
-H "X-API-Key: MAIL_<your_api_key_here>"PENDING. Retry in a few minutes — propagation is usually under 10 minutes.Once verified, create addresses with domain_id to receive at that domain:
curl -X POST https://api.mailafrica.online/api/inbound/addresses \
-H "X-API-Key: MAIL_<your_api_key_here>" \
-H "Content-Type: application/json" \
-d '{"local_part": "orders", "domain_id": 5}'List and delete
# List your receiving domains
curl https://api.mailafrica.online/api/inbound/domains \
-H "X-API-Key: MAIL_<your_api_key_here>"
# Delete (fails with 409 CONFLICT while addresses still use it)
curl -X DELETE https://api.mailafrica.online/api/inbound/domains/5 \
-H "X-API-Key: MAIL_<your_api_key_here>"You can register up to 100 receiving domains. Deleting one that still has addresses returns 409 CONFLICT — delete its addresses first.
MX records
TXT verification proves you own the domain. Once verified, point the domain's MX record at the MailAfrica inbound mail servers so real SMTP traffic is accepted. Contact support for the current MX target for your account.