Mail servers (MX records) for a domain

Lists a domain's mail servers (MX records) in priority order.

Request

GEThttps://email-validator.p.apihiver.com/v1/mx?domain=gmail.com
*
String. Domain name, e.g. gmail.com.
Language
Client
1curl --request GET \
2  --url 'https://email-validator.p.apihiver.com/v1/mx?domain=gmail.com' \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY'

Mail servers (MX records) for a domain: Email Validation API reference

Lists a domain's mail servers (MX records) in priority order. This endpoint is part of the Email Validation API: Validate email addresses: syntax, domain and mail-server (MX) checks, disposable detection, typo suggestions and normalisation.

Example response (200, application/json)

Success.

1{
2  "domain": "gmail.com",
3  "mx_records": [
4    "gmail-smtp-in.l.google.com",
5    "alt1.gmail-smtp-in.l.google.com",
6    "alt2.gmail-smtp-in.l.google.com"
7  ],
8  "accepts_mail": true
9}

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "domain: Field required"
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.