Skip to main content
ContactLintGet a free API key

API documentation

Everything the API and the MCP server return and accept. New here? The home page has a live check and five-minute snippets; pricing is its own page. OpenAPI 3.1 spec.

Authentication

Send your key as Authorization: Bearer YOUR_KEY or in an x-api-key header. Keys start with cl_live_. Get a free key (250 checks a month). Every metered response has a result object and a usage object (billed_as, free_used_this_month, free_limit, credits_remaining).

Quick start

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

The reply for that address: verdict risky, reason possible_typo, did_you_mean jane@outlook.com, suggested_action suggest_correction. Branch on suggested_action if you want one field:

const { result } = await r.json();
if (result.suggested_action === 'suggest_correction') return suggest(result.did_you_mean);
if (result.suggested_action === 'reject') return reject(result.disposable ? 'Please use a permanent email address.' : 'That email domain cannot receive mail.');
// 'accept' or 'review' (a role address such as info@): let it through

Server-side examples for Node, Python and PHP, with fail-open timeouts: validate email on signup. Framework guides: integrations.

Endpoints

MethodPathPurpose
POST/v1/email/validateValidate one email. Body {"email": "..."}. One check.
POST/v1/email/validate/batchValidate up to 50 emails. Body {"emails": ["...", "..."]}. One check per address, one request against the rate limit. See batch.
POST/v1/phone/validateValidate one phone. Body {"phone": "...", "country": "US"}; country is the default region for numbers without a + prefix. One check.
GET/v1/usageFree checks used this month and credit balance for the key. Not metered.
GET/v1/account/exportEverything stored for your key, as JSON.
POST/v1/account/rotateIssue a new secret for the same account; the old one stops working at once. Body {"confirm": "<key prefix>"}.
DELETE/v1/accountDelete your key and its data. Body {"confirm": "<key prefix>"}; add "email" to delete every key made with that address.
POST, GET, DELETE/v1/widget/keysCreate, list or disable origin-restricted publishable keys for the signup-form widget.
GET, POST, DELETE/v1/billing/autoreloadRead, set or turn off optional auto-reload. See auto-reload.
GET/v1/referralYour referral link and stats. See referrals.
POST/mcpMCP server (streamable HTTP, JSON-RPC 2.0). See MCP.
GET/openapi.jsonOpenAPI 3.1 spec.

Checks run inside Cloudflare's network; a single email check usually answers in well under a second, most of it the DNS lookup.

Email result fields

FieldTypeMeaning
inputstringThe address as sent.
syntax_validbooleanPractical RFC syntax check passed. When false, reason names the syntax problem and nothing else is checked.
reasonstring or nullWhy the verdict is not valid. Null for valid results. See reason values below.
domainstring or nullThe domain part, lowercased, IDN converted to punycode.
disposablebooleanThe domain, a parent domain, or the host its MX record points at is on the disposable list.
role_addressbooleanThe local part is a shared inbox such as info, admin, support or no-reply (separators ignored).
did_you_meanstring or nullA corrected address when the domain is one edit from a major provider (gmial.com becomes gmail.com).
free_providerbooleanThe domain is a consumer mail provider such as gmail.com or outlook.com.
mx_foundboolean or nullThe domain publishes at least one MX record. Null when syntax failed or DNS did not answer.
a_foundboolean or nullChecked only when there is no MX record: the domain has an A record, so some senders would still try to deliver. Null when not checked.
mx_recordsarray of stringsMX hosts, lowest preference first.
deliverable_domainboolean or nullTrue when the domain has an MX record or, failing that, an A record, so mail can be routed to it. A DNS fact about the domain, not proof that the mailbox exists: no SMTP connection is made.
verdictvalid, risky, invalid or unknowninvalid: syntax failed or the domain cannot receive mail. risky: a typo suggestion, disposable domain or role address. unknown: DNS did not answer. valid: none of those.
suggested_actionaccept, suggest_correction, review or rejectOne field to act on. accept for valid; suggest_correction when did_you_mean is set; reject for invalid or disposable; review for a role address or an unknown result.

Reason values

Every email result that is not valid carries a machine-readable reason.

What to do with a role flag: role based email detection. What the MX lookup can and cannot prove: MX record checker.

Phone result fields

FieldTypeMeaning
inputstringThe number as sent.
parsedbooleanlibphonenumber could read the number. When false, reason is empty or unparseable.
validbooleanThe number is valid for its region's numbering plan (right length and an allocated range).
possiblebooleanThe length is plausible for the region, whether or not the range is allocated.
typestring or nullMOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, VOIP, TOLL_FREE and so on, from the numbering plan.
regionstring or nullISO 3166-1 alpha-2 region the number belongs to.
country_calling_codestring or nullFor example +1 or +44.
e164, national, internationalstring or nullThe same number in E.164, national and international formats.
suggested_actionaccept, review or rejectaccept when valid, review when only possible, reject otherwise. Says nothing about whether the line is in service.

Parsing uses libphonenumber metadata only; nothing is sent to a carrier, so the check cannot tell whether a number is in service. Guide: phone number validation API.

Batch

POST /v1/email/validate/batch takes up to 50 addresses and returns results in the same order, a summary (counts by verdict and by suggested_action) and a usage block. It is all or nothing: if the key lacks checks for the whole list, nothing is checked and nothing is billed (HTTP 402 says how many remain). Addresses whose DNS lookup failed are not billed. The request counts once against the 60 per minute limit, so a key can check up to 3,000 addresses a minute. Clean a CSV in the browser at /clean-list, or with the Python script.

Errors and limits

Errors are JSON: {"error": {"code": "...", "message": "..."}}.

MCP server

Point any client that supports streamable HTTP at https://contactlint.com/mcp with the header Authorization: Bearer YOUR_KEY. Nothing to install.

{
  "mcpServers": {
    "contactlint": {
      "type": "http",
      "url": "https://contactlint.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}

Tools: validate_email (email), validate_emails (emails, up to 50) and validate_phone (phone, country). Each address or number checked uses one check; results are the same objects as the REST API, under structuredContent. initialize and tools/list work without a key, and so do validate_email and validate_phone for a trial of 20 checks per day per network (usage.billed_as is trial); validate_emails needs a key. Listed in the official MCP Registry as com.contactlint/contactlint and on Glama. Client-by-client setup: email validation MCP server.

Signup-form widget (beta)

Shows "Did you mean jane@example.com?" under an email field, or a short note for undeliverable and disposable addresses. It never blocks the form. Create a publishable key restricted to your site's origin with your secret key:

curl -X POST https://contactlint.com/v1/widget/keys \
  -H "Authorization: Bearer YOUR_SECRET_KEY" -H "content-type: application/json" \
  -d '{"origins":["https://yoursite.com"],"daily_cap":200}'

Then mark the input and load the script:

<input type="email" name="email" data-contactlint>
<script src="https://contactlint.com/widget/v1.js" integrity="sha384-KAhE9k8Fk3z0VAgWuvyQVOe3oufL+9BQ0oGyeBRvlyCNgp2yw24MzRrEpseULwz7" crossorigin="anonymous" data-key="cl_pub_..." defer></script>

/widget/v1.js never changes, so the integrity hash above stays valid; /widget.js always serves the latest version without a hash. Options: data-selector to pick inputs you cannot edit, data-contactlint-hint to render the hint into an element you control, and a contactlint:result event on the input with the result (verdict, reason, suggested_action, did_you_mean, disposable, role_address).

Limits: a publishable key answers browser requests from the origins you list only, at most 10 checks per minute per visitor network, 30 per minute per key, and your daily cap (default 200, up to 10,000). Each check uses one check from your secret key. The key is visible in page source and the Origin header can be forged outside a browser, so set the daily cap to what you are willing to spend; disable a key with DELETE /v1/widget/keys. Addresses typed into the field are sent to ContactLint; mention this in your privacy notice. Guides: setup, React, WordPress and site builders.

Usage, export, rotate, delete

There is no login: the key is the credential. It is shown once at signup and stored only as a hash, so a lost key cannot be recovered; rotate while you still have it, or create a new key (up to 3 per email).

Data sources

Disposable domains come from the disposable-email-domains project (CC0 1.0), refreshed from upstream; the current count and fetch date are on the list page. Phone parsing uses libphonenumber-js (MIT). DNS lookups use Cloudflare DNS-over-HTTPS. Changes to any of this appear on the changelog.