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>"
},
"verification_records": [
{ "type": "TXT", "host": "@", "value": "mail-verify=<64-hex-chars>" },
{ "type": "MX", "host": "@", "value": "10 mx.mailafrica.online" },
{ "type": "A", "host": "mx.mailafrica.online", "value": "<mail server public IP>" }
]
}
}Verify the domain
Publish all three records at your DNS provider, then ask MailAfrica to check them:
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. The TXT record proves ownership; the MX record must point at the MailAfrica inbound mail server; and the MX host's A record must resolve to the mail server's public IP — otherwise email to your domain is routed elsewhere and never delivered.In the dashboard
On the Domains page of the dashboard (app.mailafrica.online), each domain shows two panels. The Receiving (inbound) panel — *"Email sent to any address on this domain lands in your inbox"* — lists exactly the records you must publish, each with Type, Host, Value, and a copy button, plus a Verify button:
| Type | Host | Value | Why it's needed |
|---|---|---|---|
| TXT | @ | mail-verify=<token> | Proves you own the domain |
| MX | @ | 10 mx.mailafrica.online | Routes mail to the MailAfrica mail server |
| A | mx.mailafrica.online | <mail server public IP> | Makes the MX hostname resolve to the server |
Publish all three at your DNS provider, then click Verify. Until they match, the badge reads Pending verification; if DNS hasn't propagated yet the app returns a PENDING notice — wait a few minutes and click Verify again. When every record checks out, the badge turns Verified with the timestamp and mail to any address on the domain is delivered. If the A record's value shows a hint like *"point this host to your MailAfrica mail server IP"*, the platform hasn't published its inbound IP yet — contact support.
mx.mailafrica.online as the host turns it into mx.mailafrica.online.mailafrica.online — enter just the label shown. And the A record must exist in the zone that owns the MX hostname (mx.mailafrica.online), not under your own domain. Keep all three records in place permanently — removing the MX or A record silently stops delivery.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, mail is routed to your MailAfrica inbox through the MX record — publish MX @ → 10 mx.mailafrica.online at your DNS provider (the exact target is shown in the app). The MX hostname must resolve to the MailAfrica mail server: publish the matching A record (mx.mailafrica.online → <mail server public IP>) so mail actually reaches the server instead of whatever host the MX points at. Keep both in place; without them, email to your domain is never delivered.