Skip to main content
ContactLintGet a free API key

Home / MX Record Checker API: Verify Email Domains at Signup

MX Record Checker API: Verify Email Domains at Signup

Published ยท Updated

Email this to yourself

Before you save an email address, it helps to know the domain can receive mail. Send one address to the ContactLint API and it runs an MX record lookup on the domain, checks for an A record, and handles a few other checks in the same call.

What an MX record tells you about an email address

MX records and A records

MX stands for mail exchanger. A domain's MX records, also called mail exchange records, list the mail servers that accept email for it. When someone writes to name@example.com, the sending server runs a DNS query for the MX records of example.com to find out where to deliver. An MX record holds a hostname, not an IP address, so the sender then looks up that hostname's address record.

A domain with no MX record can still take mail at its address record, so ContactLint looks up both. If a domain has neither, mail to it has nowhere to go.

Multiple MX records and priority

Many domains publish multiple MX records, each with a priority value. Sending servers try the lowest priority number first and fall back to a higher priority value if that server doesn't answer. That's how backup email servers are usually configured.

For a signup form, the priorities don't change the decision. What matters is whether a mail exchanger is configured at all. To inspect one domain by hand, run a DNS lookup or use an MX lookup tool and ask for the MX record type. You'll see the hostnames and priorities returned by your DNS servers.

What a passing MX check does not prove

A passing MX check means the domain is set up for mail, not that a specific mailbox exists or that anyone reads it. A valid result doesn't guarantee delivery, and it can't diagnose email delivery issues past DNS. Treat it as a strong signal, not a promise.

How ContactLint checks MX records

What runs on every email check

Each email you send gets checked for:

What it does not do

ContactLint never opens an SMTP connection to the mailbox or asks the email server whether a user exists. For SMTP diagnostics or blacklist checks on your own mail server, a dedicated DNS tool is the better fit. Checked emails are not stored. For the lookup, the domain part goes to Cloudflare's DNS resolver. The privacy policy has the details.

Run an MX check in one API call

curl example

Grab a free API key, then send the address to the email endpoint:

curl -X POST https://contactlint.com/v1/email/validate \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"email":"someone@example.com"}'

Send your key as Authorization: Bearer YOUR_KEY or in an x-api-key header. The full response shape is in the OpenAPI 3.1 spec at /openapi.json.

For the MX decision, four fields matter: mx_found, a_found, deliverable_domain, and verdict. The verdict is one of valid, risky, invalid, or unknown. Each call counts as one check.

Errors and limits

Call GET /v1/usage to see your free checks used this month and your credit balance.

What your signup form should do with each MX result

Block too hard and you turn away real people. Block too little and dead addresses pile up.

Decision table

Response What it likely means What the form should do Message to show
mx_found is true Domain is set up for mail Accept and move on to the other checks None
mx_found is false, a_found is true Domain may still take mail at its address record Set your own policy. Look at deliverable_domain and verdict, then accept, or warn and let the person confirm Your choice, or "Please double-check your email address."
mx_found is false, a_found is false Mail has nowhere to go. This can mean a typo in the domain Ask the person to fix it "We can't find a mail server for that domain. Please check the spelling."
verdict is unknown, or your request to the API fails No clear answer, which is not the same as a bad address Don't block. Accept or save for review None, or "We'll confirm your email shortly."

To keep it fair to real users:

Server-side example

Run the check on your server. Your API key should never sit in front-end code.

// Node.js, server side
async function checkEmail(email) {
  let res;
  try {
    res = await fetch("https://contactlint.com/v1/email/validate", {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${process.env.CONTACTLINT_KEY}`,
        "content-type": "application/json"
      },
      body: JSON.stringify({ email })
    });
  } catch (err) {
    return { action: "accept_and_review" }; // network problem: don't block
  }
  if (!res.ok) {
    // e.g. 429 or 402. Log it; fix 400, 401 and 402 on your side.
    return { action: "accept_and_review" };
  }
  const r = await res.json();
  // Check /openapi.json for where these fields sit and adjust paths.
  if (r.verdict === "unknown") return { action: "accept_and_review" };
  if (r.mx_found) return { action: "accept" };
  if (r.a_found) return { action: "your_policy", result: r };
  return { action: "ask_to_fix" };
}

Your form calls your server, your server calls ContactLint, and the form shows the matching message from the table.

Run the MX check from an AI agent (MCP)

Point any MCP client that supports streamable HTTP at https://contactlint.com/mcp with the header Authorization: Bearer YOUR_KEY. You get three tools: validate_email, validate_emails (up to 50 addresses per call) and validate_phone. Email checks include the MX and A record lookup, and each tool call uses one check.

Cost

The Free plan gives you 250 checks per month, no card required. Credit packs start at 5,000 checks for $9 and are used after your monthly free checks run out. See the pricing section of the home page or the FAQ below. The email and phone validation API page covers phone checks too.

FAQ

What does an MX record checker do?

An MX record checker looks up the mail exchanger records in a domain's DNS. Those records say which servers accept email for that domain. If a domain has no MX record and no address record, mail sent to it has nowhere to go. That makes the address a poor choice to store or contact.

Why is an MX check important?

It catches addresses that can never receive mail before they enter your database. A mistyped or made-up domain often has no mail exchange records, so the check flags it while the person can still fix it. It is also a light check: a DNS lookup, no connection to a mail server, and no message sent.

What is MX preference?

MX preference, also called priority, is the number attached to each MX record. When a domain has multiple MX records, sending servers try the one with the lowest number first and fall back to higher numbers if it does not answer. A domain with one MX record still has a priority value. It just has nothing to compete with.

Who controls my MX record?

Whoever manages the DNS zone for the domain. That is usually the domain owner, working through the control panel of the DNS host or registrar. Your email provider tells you which records to add, but it cannot add them for you unless it also runs your DNS. Anyone can read MX records, because public DNS records are public.

Does ContactLint connect to the mail server?

No. ContactLint never opens an SMTP connection to the mailbox. It checks syntax, looks up MX and A records through Cloudflare DNS-over-HTTPS, and compares the domain against a disposable domain list. It also flags role addresses and free mail providers. That means it checks the domain is set up for mail, not that one mailbox exists.

How much does it cost to check MX records with ContactLint?

The free plan includes 250 checks per month and needs no card. The MX lookup runs inside the email validation call. If you need more than 100, you can buy credit packs: 5,000 checks for $9, 25,000 for $35, or 100,000 for $99 (USD). Credits do not expire. Unused credits are refundable within 14 days of purchase.

Can an AI agent run the MX check?

Yes. ContactLint has an MCP server at https://contactlint.com/mcp. Point any MCP client that supports streamable HTTP at it and send your key in the Authorization header. The validate_email tool checks email addresses, and email checks include the MX and A record lookup. Each address or number checked uses one check.

What should my form do if the MX check fails?

Show a short, plain message and let the person fix the address. A missing MX record can mean a typo in the domain, like a misspelled provider name. Avoid hard blocking on a DNS timeout, because that is a lookup problem, not a bad address. Ask the person to try again or save it for review.

Start checking MX records

Get a free API key for 250 checks per month, no card needed. No email is sent at signup. Your key is shown once, so save it somewhere safe.

Questions? Email support@contactlint.com. Read our privacy policy and terms.

Get a free API key. 250 checks per month, no card required.

Signup Form Validation Checklist

Map mx_found, a_found, deliverable_domain and the rest of the response to Accept, Warn, or Block. Includes a 429 retry line, a fail-open or fail-closed choice for 402, and a credits worksheet.

Disposable addresses are not accepted. Yes, we check with our own API.

Nothing is emailed to you automatically. The checklist opens on this page as soon as you send the form. We do not sell your data. Privacy policy.