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
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/email/validate | Validate one email. Body {"email": "..."}. One check. |
| POST | /v1/email/validate/batch | Validate up to 50 emails. Body {"emails": ["...", "..."]}. One check per address, one request against the rate limit. See batch. |
| POST | /v1/phone/validate | Validate one phone. Body {"phone": "...", "country": "US"}; country is the default region for numbers without a + prefix. One check. |
| GET | /v1/usage | Free checks used this month and credit balance for the key. Not metered. |
| GET | /v1/account/export | Everything stored for your key, as JSON. |
| POST | /v1/account/rotate | Issue a new secret for the same account; the old one stops working at once. Body {"confirm": "<key prefix>"}. |
| DELETE | /v1/account | Delete your key and its data. Body {"confirm": "<key prefix>"}; add "email" to delete every key made with that address. |
| POST, GET, DELETE | /v1/widget/keys | Create, list or disable origin-restricted publishable keys for the signup-form widget. |
| GET, POST, DELETE | /v1/billing/autoreload | Read, set or turn off optional auto-reload. See auto-reload. |
| GET | /v1/referral | Your referral link and stats. See referrals. |
| POST | /mcp | MCP server (streamable HTTP, JSON-RPC 2.0). See MCP. |
| GET | /openapi.json | OpenAPI 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
| Field | Type | Meaning |
|---|---|---|
input | string | The address as sent. |
syntax_valid | boolean | Practical RFC syntax check passed. When false, reason names the syntax problem and nothing else is checked. |
reason | string or null | Why the verdict is not valid. Null for valid results. See reason values below. |
domain | string or null | The domain part, lowercased, IDN converted to punycode. |
disposable | boolean | The domain, a parent domain, or the host its MX record points at is on the disposable list. |
role_address | boolean | The local part is a shared inbox such as info, admin, support or no-reply (separators ignored). |
did_you_mean | string or null | A corrected address when the domain is one edit from a major provider (gmial.com becomes gmail.com). |
free_provider | boolean | The domain is a consumer mail provider such as gmail.com or outlook.com. |
mx_found | boolean or null | The domain publishes at least one MX record. Null when syntax failed or DNS did not answer. |
a_found | boolean or null | Checked 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_records | array of strings | MX hosts, lowest preference first. |
deliverable_domain | boolean or null | True 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. |
verdict | valid, risky, invalid or unknown | invalid: 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_action | accept, suggest_correction, review or reject | One 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.
- Risky:
possible_typo,disposable,role_address. When several apply, that is the order of precedence; thedisposable,role_addressanddid_you_meanfields still show every signal. - Invalid:
no_mx_or_a, or a syntax reason:not_a_string,too_long,missing_at_or_local,local_too_long,invalid_local_part,invalid_domain,numeric_tld. - Unknown:
dns_error. The lookup failed, so the check is not billed.dns_erroris also kept on a risky result when local checks flagged the address but DNS did not answer; that check is not billed either. - Valid:
null.
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
| Field | Type | Meaning |
|---|---|---|
input | string | The number as sent. |
parsed | boolean | libphonenumber could read the number. When false, reason is empty or unparseable. |
valid | boolean | The number is valid for its region's numbering plan (right length and an allocated range). |
possible | boolean | The length is plausible for the region, whether or not the range is allocated. |
type | string or null | MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, VOIP, TOLL_FREE and so on, from the numbering plan. |
region | string or null | ISO 3166-1 alpha-2 region the number belongs to. |
country_calling_code | string or null | For example +1 or +44. |
e164, national, international | string or null | The same number in E.164, national and international formats. |
suggested_action | accept, review or reject | accept 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": "..."}}.
400 bad_request: missing or wrong field, or a batch over 50.401 missing_api_keyor401 invalid_api_key.402 quota_exceeded: the month's free checks are used and no credits remain. Buy credits; the free allowance resets each calendar month.409 busy: the same key is being used concurrently in a batch; retry.429 rate_limited: more than 60 requests per minute per key.503 billing_disabled: checkout is not enabled on this environment.
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
GET /v1/usagereturns the key prefix, the current period, free checks used, the free limit and credits remaining. The same numbers in a browser: /usage.GET /v1/account/exportdownloads everything held for the key as JSON: key details, usage by month, credit ledger, auto-reload settings, publishable keys and referrals.POST /v1/account/rotatewith{"confirm": "<key prefix>"}returns a new secret once and disables the old one immediately. Credits, usage, publishable keys and settings stay with the account.DELETE /v1/accountwith{"confirm": "<key prefix>"}deletes the key and its data; unused credits are lost, so ask for a refund first. Same from a page: delete my account.
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.