Add Domain
Register a custom domain for MX-based message capture.
Register a custom domain for MX-based message capture.
Scope: email_testing.domains.write
Request Body
namestringrequiredThe domain you want to receive test mail on, for example test.example.com. Point its MX record at mx.sandbox.maileroo.io.
Sample Request
Request
curl -X POST "https://api.maileroo.com/v1/email-testing/domains" \
-H "Authorization: Bearer roo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"name":"test.example.com"}'Sample Response
The response is wrapped in a data object.
Response
{
"data": {
"id": "289b7d13-d135-45fc-8ab6-02f7abf11d6a",
"account_id": "12345",
"name": "test.example.com",
"status": "pending",
"mx_hostname": "mx.sandbox.maileroo.io",
"observed_mx": [],
"last_checked_at": null,
"created_at": "2025-01-01T12:00:00Z"
}
}Errors
400 Bad Request— the domain name is missing or invalid, or the shared sandbox domain was submitted.409 Conflict— the domain has already been added.429 Too Many Requests— the account reached its custom-domain limit.