POST
/api/email-verify$0.005🛠️ Email Verifier
Validate email addresses with a multi-layer approach: RFC 5322 format checking, live MX record DNS resolution, and detection of 150+ disposable/throwaway email providers. Also suggests corrections for common typos (e.g. gmal.com → gmail.com). Returns a risk level (low / medium / high) to help with signup fraud prevention.
Request Body
Response Fields
Code Examples
cURL
bash
curl -X POST https://sparkforge.sh/api/email-verify \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <x402-payment-token>" \
-d '{"email": "user@gmal.com"}'Python
python
import requests
response = requests.post(
"https://sparkforge.sh/api/email-verify",
headers={
"Content-Type": "application/json",
"X-PAYMENT": "<x402-payment-token>"
},
json={"email": "user@mailinator.com"}
)
data = response.json()
print(f"Valid: {data['valid']} | Risk: {data['riskLevel']}")
if data["suggestion"]:
print(f"Did you mean: {data['suggestion']}?")
if data["disposable"]:
print("⚠️ Disposable email detected — reject signup")TypeScript / Node.js
typescript
import { wrapFetchWithPayment } from "@x402/fetch";
const fetch402 = wrapFetchWithPayment(fetch, wallet);
const res = await fetch402("https://sparkforge.sh/api/email-verify", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "user@gmail.com" }),
});
const { valid, disposable, riskLevel, suggestion, mx } = await res.json();
if (!valid) {
console.warn("Invalid email:", riskLevel, suggestion);
}Example Response
json
{
"valid": true,
"email": "user@gmail.com",
"format": { "valid": true },
"mx": {
"hasMx": true,
"records": ["alt1.gmail-smtp-in.l.google.com", "gmail-smtp-in.l.google.com"]
},
"disposable": false,
"suggestion": null,
"domain": "gmail.com",
"riskLevel": "low"
}💳 Payment via x402
This endpoint costs $0.005 per call, paid in USDC on Base, Polygon, or Solana. Use the @x402/fetch library to handle payments automatically, or implement the x402 handshake manually.
bash
# Free demo mode (no payment)
curl https://sparkforge.sh/api/email-verify?demo=true
# Or try via MCP (Claude Desktop, Cursor, Windsurf)
# Add to mcp config: { "url": "https://sparkforge.sh/api/mcp" }