apyhub
COMMUNICATIONS · DATA VALIDATION

Email MX Lookup API

What it does

Email MX Lookup checks whether an email domain has MX records and returns the DNS records it finds. Send an email query value, and get back the original email, the extracted domain, a boolean has_mx, and the mx_records array.

Use it when you need to confirm that a domain is configured to receive mail before you send a signup email, invite, password reset, or lead outreach message. It gives you a lightweight way to screen obviously undeliverable addresses and avoid wasting sends on domains without mail exchange setup.

The response is intentionally simple: you get the domain-level mail routing result, not mailbox-level verification. That makes Email MX Lookup useful as an early validation step in signup forms, contact workflows, CRM hygiene jobs, and email list preprocessing.

If your app already collects email addresses, this endpoint fits into a validation pipeline alongside syntax and domain checks. It answers one specific question clearly: can this domain receive email?

GET
Look up MX records to confirm a domain can receive email
http://localhost:8080/dosvak/check-email-mx
QUICKSTARTGUIDE

Quickstart

Check whether a domain’s MX records exist by passing the email address as a query parameter.

curl -X GET "http://localhost:8080/dosvak/[email protected]" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with these top-level fields: email (string), domain (string), has_mx (boolean), and mx_records (array of arrays). has_mx indicates whether MX records were found for the email’s domain.

{
  "email": "[email protected]",
  "domain": "example.com",
  "has_mx": true,
  "mx_records": [["10", "mx1.example.com"], ["20", "mx2.example.com"]]
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Looks up the MX records for the domain extracted from the provided email address and returns whether that domain has MX records. The response also includes the email, the domain, and the raw mx_records array structure returned by the API.

Query Parameter(s)

AttributeTypeMandatoryDescription
emailStringYesEmail address to check.

Response

Returns a JSON object with email and domain string fields, a has_mx boolean field, and an mx_records field typed as an array of arrays. Success is indicated by a successful GET response.

ParameterTypeMandatoryDescription
emailStringNoEmail address that was checked.
domainStringNoDomain extracted from the email address.
has_mxBooleanNotrue if the domain has MX records, false otherwise.
mx_recordsObject ArrayNoMX records returned by the lookup, represented as an array whose items are arrays. The schema does not define the inner item shape.

Query parameters

Name
Type
Description
emailREQUIRED
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.