Email validate
POST /api/email-validateValidate an email address: syntax check plus live MX record lookup on the domain (deliverability signal, not a guarantee). Send POST /api/email-validate with the required field email and pay $0.001 per call over x402 or MPP (there is no free tier). It returns a JSON object with email, syntaxValid, domain, mxRecords and deliverableDomain.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email | string | yes | Email address to check |
Example request
curl -i -X POST https://agent402.tools/api/email-validate \
-H "Content-Type: application/json" \
-d '{"email":"someone@gmail.com"}'
Without payment this returns HTTP 402 Payment Required with the exact price for email-validate; any x402 v2 or MPP client pays it and retries.
Example response
{
"email": "someone@gmail.com",
"syntaxValid": true,
"domain": "gmail.com",
"mxRecords": [
"gmail-smtp-in.l.google.com",
"alt1.gmail-smtp-in.l.google.com"
],
"deliverableDomain": true
}
| Field | Type | Always present | In the example |
|---|---|---|---|
email | string | yes | someone@gmail.com |
syntaxValid | boolean | yes | true |
domain | string | yes | gmail.com |
mxRecords | array of string | yes | 2 items in the example |
deliverableDomain | boolean | yes | true |
From an MCP client
catalog.call {
"slug": "email-validate",
"params": {
"email": "someone@gmail.com"
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for email-validate; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.
Errors and behavior
emailis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement is cancelled when the tool fails. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
GETorHEADto /api/email-validate returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/email-validate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"email": "someone@gmail.com"
}),
});
Part of these workflows
Email validate is one step in these 3 skill packs, each sold as a single call:
- Email deliverability - Diagnose why a domain's email lands in spam: SPF posture, DMARC policy, DKIM key strength, MX targets, and a composite 0–100 score.
- User onboarding - Take a signup form submission and run the full onboarding workup deterministically: validate the email, score the chosen password, mint a stable internal ID, derive a URL-safe handle from the display name, generate a recovery / API secret, hash the password for storage, and verify the 2FA setup code. One pass, every step a pure-CPU call.
- Contact verification - Verify an email address is deliverable - syntax validation plus MX record check on the domain.
Related tools
Email deliverability check
POST /api/email-deliverabilityEnd-to-end email-auth report for a domain: SPF + DMARC + DKIM (probes common selectors automatically) + MX records + sco…
Card number validate
POST /api/card-validateValidate a payment card number (Luhn checksum) and detect the brand. Numbers are not stored or logged.
IBAN validate
POST /api/iban-validateValidate an IBAN: country code, length, and the ISO 13616 mod-97 checksum.
ISBN validate
POST /api/isbn-validateValidate an ISBN-10 or ISBN-13 checksum (hyphens/spaces ignored) and report which format it is.
JSON Schema infer
POST /api/json-schema-inferInfer a draft-07 JSON Schema from sample JSON document(s). Send one sample as json, or several as samples. Heuristic mer…
UUID validate
POST /api/uuid-validateValidate a UUID and report its version (1-8) and variant. Accepts hyphenated or braced forms.