Search by task, endpoint, field, or error.
MX API
Mail exchange records for a domain.
Mail exchange records for a domain. Each row is a priority and host, sorted the way mailers try them.
Empty mx means no mail exchanger. That is an answer, not an error. Records share the DNS API's cache and expire with their DNS lifetime, capped at one hour. Failed refreshes return 503 instead of old records.
For other record types and TTLs, use DNS. To check if a domain is free to register, use Domain.
Lookup
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.mx("gmail.com");
console.log(result);Run on your server with a secret key. Calling from a browser or app?
Example response
{
"domain": "gmail.com",
"mx": [
{
"priority": 5,
"host": "gmail-smtp-in.l.google.com"
},
{
"priority": 10,
"host": "alt1.gmail-smtp-in.l.google.com"
},
// ... 3 more
]
}import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.mx("example.com");
console.log(result);Run on your server with a secret key. Calling from a browser or app?
Example response
{
"domain": "example.com",
"mx": [
{
"priority": 0,
"host": "."
}
]
}Response fields
Questions? Email