MailCheck Developer Documentation

Official SDKs Available

Integrate sub-50ms email validation, 40M+ disposable burner domain blocking, typo autocorrection, and DNS MX server verification directly into your web applications, mobile apps, and backend registration pipelines.

40M+ Burners
Real-time blocking of temporary disposable mailboxes (*10minutemail, Mailinator, GuerrillaMail*).
Sub-50ms Speed
Edge network deployment with in-memory TTL caching for instant signup authorization.
Fail-Safe Protection
failSilent: true ensures network blips never crash genuine user registrations.
RECOMMENDED

Official Client SDKs

Install our battle-tested, high-performance client libraries for Node.js, Python, and Flutter with built-in sub-50ms caching, fail-safe fallbacks, and 1-line framework integrations.

NPM Package

@fadsync/mailcheck-edge

Ultra-fast Express & Connect middleware with LRU caching, failSilent error recovery, and full TypeScript declarations.

npm i @fadsync/mailcheck-edge
View on npmjs.com
PyPI Package

fadsync-mailcheck

Sync & Async httpx client with drop-in FastAPI route guards and Django model validators.

pip install fadsync-mailcheck
View on pypi.org
Pub.dev Package

flutter_fadsync_email_validator

Pre-styled Flutter text field widget with real-time debounce, visual typo autocorrect chips, and live MX indicators.

flutter pub add flutter_fadsync_email_validator
View on pub.dev

Node.js & Express SDK (@fadsync/mailcheck-edge)

Designed for high-concurrency Node.js microservices, Next.js API routes, and Express authentication handlers. Includes sub-50ms in-memory TTL caching and a 1-line route middleware.

Installation & Setup

$ npm install @fadsync/mailcheck-edge

Key Features

  • 1-Line Express Guard: app.post('/signup', mailCheckGuard(), handler)
  • Zero Dependencies: Lightweight client with built-in HTTP agent pooling.
  • Fail-Safe Resilience: failSilent: true prevents downtime during upstream outages.
  • TypeScript Support: Full autocomplete for ValidationResult and options.
// 1. Install official SDK: npm install @fadsync/mailcheck-edge
const express = require('express');
const { mailCheckGuard } = require('@fadsync/mailcheck-edge');

const app = express();
app.use(express.json());

// Protect signup route with 1-line Express middleware
app.post('/api/auth/register', 
  mailCheckGuard({ 
    apiKey: process.env.FADSYNC_API_KEY, 
    blockDisposable: true,
    blockDeadMx: true
  }), 
  (req, res) => {
    // req.mailCheck contains verified validation results
    res.json({ message: "Registration successful!", risk: req.mailCheck.riskScore });
  }
);

Python, FastAPI & Django SDK (fadsync-mailcheck)

Comprehensive Python package supporting synchronous (FadSyncMailCheck) and asynchronous (AsyncFadSyncMailCheck) workflows using httpx.

Installation & Extras

$ pip install fadsync-mailcheck
$ pip install "fadsync-mailcheck[fastapi]"
$ pip install "fadsync-mailcheck[django]"

Key Features

  • FastAPI Route Dependency: Drop-in FastAPIEmailGuard returning 422 on burner emails.
  • Django Field Validator: Add validators=[FadSyncEmailValidator()] to model fields.
  • Pydantic v1 & v2 Models: Ready for modern async backends and schemas.
  • PEP 561 Compliant: Bundled with py.typed for full IDE typing.
# 1. Install: pip install "fadsync-mailcheck[fastapi]"
from fastapi import FastAPI, Depends, status
from pydantic import BaseModel, EmailStr
from fadsync_mailcheck import FastAPIEmailGuard, ValidationResult

app = FastAPI()
email_guard = FastAPIEmailGuard(api_key="YOUR_FADSYNC_API_KEY", block_disposable=True)

class SignupRequest(BaseModel):
    name: str
    email: EmailStr

@app.post("/api/signup", status_code=status.HTTP_201_CREATED)
async def signup(
    payload: SignupRequest,
    check: ValidationResult = Depends(lambda req: email_guard(req.email))
):
    # Rejects 40M+ burner emails & dead MX with HTTP 422 automatically
    return {"status": "verified", "risk_score": check.risk_score}

Flutter Mobile SDK (flutter_fadsync_email_validator)

A drop-in Flutter UI widget (FadSyncEmailFormField) featuring live debounced validation, loading spinners, domain typo chips, and full integration with Flutter Form validation.

Installation

$ flutter pub add flutter_fadsync_email_validator

Key Features

  • Pre-Built UI Widget: Replaces standard TextFormField with zero extra layout code.
  • Interactive Typo Chips: Suggests fixes (e.g. user@gamil.com ➔ user@gmail.com) with 1-tap replacement.
  • Configurable Debounce: Prevents excessive network calls while the user is actively typing.
// 1. Add to pubspec.yaml: flutter pub add flutter_fadsync_email_validator
import 'package:flutter/material.dart';
import 'package:flutter_fadsync_email_validator/flutter_fadsync_email_validator.dart';

// Drop-in form field with real-time debounce & typo autocorrect
FadSyncEmailFormField(
  apiKey: "YOUR_FADSYNC_API_KEY",
  blockDisposable: true,
  enableTypoAutocorrect: true,
  decoration: InputDecoration(
    labelText: "Work Email Address",
    prefixIcon: Icon(Icons.email_outlined),
  ),
  onValidated: (result) {
    print("Risk score: ${result.riskScore}, Disposable: ${result.isDisposable}");
  },
)

AI Assistant Setup Prompts

Cursor · Claude · ChatGPT · Copilot

Using an AI coding assistant? Copy and paste these pre-tuned prompts into your editor to integrate FadSync MailCheck into your codebase in seconds.

Node.js / Express AI Setup Prompt

JavaScript / Express
"Install @fadsync/mailcheck-edge and protect my user registration route against disposable emails. Configure failSilent: true and inject the validation result into the response."

FastAPI / Python AI Setup Prompt

Python / FastAPI
"Add fadsync-mailcheck to my FastAPI backend. Use FastAPIEmailGuard as a route dependency to block 40M+ burner domains with HTTP 422 and return typo suggestions if available."

Django Form & Model Validator Prompt

Python / Django
"Integrate FadSyncEmailValidator into my Django CustomUser model and registration form so fake burner emails and domains with dead MX servers are rejected automatically."

Flutter Mobile Signup Form Prompt

Dart / Flutter
"Use flutter_fadsync_email_validator to replace my standard TextFormField with FadSyncEmailFormField, enabling real-time debounce verification and typo autocorrect chips."

Direct API Key Authentication

Every request to the FadSync MailCheck API is authenticated via your private FadSync API key. You can pass the key using standard HTTP headers:

Header FormatExampleDescription
AuthorizationBearer YOUR_FADSYNC_API_KEYStandard OAuth2 / Bearer token header (Recommended)
X-API-KeyYOUR_FADSYNC_API_KEYAlternative direct header for legacy HTTP clients

Quickstart

1. Create your account at mailcheck.fadsync.com to obtain your live API key.
2. Choose an official SDK (@fadsync/mailcheck-edge, fadsync-mailcheck, or flutter_fadsync_email_validator) or send raw HTTP requests.
3. Check incoming email inputs during signup or checkout to reject disposable spam before creating user records.

POST

/api/v1/verify

Verifies a single email address against 40M+ disposable burner domains, checks RFC syntax, performs DNS MX mail server lookups, and calculates a comprehensive risk score.

Body Parameters (JSON)

emailstring
required

The email address to validate. e.g. user@trashmail.com.

Response Body (JSON)

200 OK
{
  "email": "user@trashmail.com",
  "is_valid_format": true,
  "is_disposable": true,
  "is_free_provider": false,
  "is_role_account": false,
  "risk_score": 95,
  "typo_fix": null,
  "domain_details": {
    "domain": "trashmail.com",
    "has_valid_mx": true,
    "mx_records": ["mx.trashmail.com"]
  }
}
// 1. Install official SDK: npm install @fadsync/mailcheck-edge
const { FadSyncMailCheck } = require('@fadsync/mailcheck-edge');

const mailcheck = new FadSyncMailCheck({
  apiKey: process.env.FADSYNC_API_KEY,
  failSilent: true, // Graceful fallback on network blips
  cacheTtlMs: 300000 // Sub-50ms in-memory TTL cache
});

async function handleSignup(req, res) {
  const result = await mailcheck.verify(req.body.email);

  if (result.isBlocked) {
    return res.status(422).json({
      success: false,
      error: result.userFriendlyMessage,
      isDisposable: result.isDisposable,
      suggestedEmail: result.typoFix
    });
  }

  // Proceed with registration...
  res.json({ success: true, riskScore: result.riskScore });
}
POST

/api/v1/bulk

Validate up to 1,000 email addresses in a single high-throughput batch request. Perfect for CSV cleaning, list hygiene, and bulk database audits.

Body Parameters

emailsarray[string]
required

Array of emails to validate. e.g. ["user1@gmail.com", "fake@trashmail.com"].

Response Body

200 OK
{
  "results": [
    {
      "email": "user1@gmail.com",
      "is_disposable": false,
      "risk_score": 5
    },
    {
      "email": "fake@trashmail.com",
      "is_disposable": true,
      "risk_score": 95
    }
  ]
}
curl --request POST \
  --url https://mailcheck.fadsync.com/api/v1/bulk \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_FADSYNC_API_KEY' \
  --data '{"emails": ["user1@gmail.com", "fake@trashmail.com"]}'
GET

/api/v1/domain

Audit an entire domain to check disposable status, active MX records, and mail infrastructure without querying a specific mailbox.

Query Parameters

domainstring
required

The domain to inspect. e.g. trashmail.com.

Response Body

200 OK
{
  "domain": "trashmail.com",
  "is_disposable": true,
  "has_valid_mx": true,
  "mx_records": ["mx.trashmail.com"],
  "risk_score": 95
}
curl --request GET \
  --url 'https://mailcheck.fadsync.com/api/v1/domain?domain=trashmail.com' \
  --header 'Authorization: Bearer YOUR_FADSYNC_API_KEY'

cURL & Raw HTTP

Integrate directly using raw HTTP requests from terminal scripts, microservices, or webhook triggers.

curl -X POST https://mailcheck.fadsync.com/api/v1/verify \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_FADSYNC_API_KEY" \
  -d '{"email": "alex.hunter@gmail.com"}'

PHP & Laravel Integration

Clean native PHP integration using curl_init() or Laravel Http::withToken().

// Laravel 9+ / 10+ / 11+
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('FADSYNC_API_KEY'))
    ->post('https://mailcheck.fadsync.com/api/v1/verify', [
        'email' => $request->input('email')
    ]);

if ($response->json('is_disposable') === true) {
    return back()->withErrors(['email' => 'Disposable emails are not permitted.']);
}

Go (Golang) Integration

Fast and concurrent Go email validation using standard net/http client.

package main

import (
    "bytes"
    "encoding/json"
    "net/http"
    "os"
)

func verifyEmail(email string) (*http.Response, error) {
    reqBody, _ := json.Marshal(map[string]string{"email": email})
    req, _ := http.NewRequest("POST", "https://mailcheck.fadsync.com/api/v1/verify", bytes.NewBuffer(reqBody))
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer " + os.Getenv("FADSYNC_API_KEY"))

    client := &http.Client{}
    return client.Do(req)
}

Error Handling & Rate Limits

The FadSync API returns standard HTTP status codes. When using our official SDKs (@fadsync/mailcheck-edge or fadsync-mailcheck), you can enable failSilent: true to ensure your application continues running smoothly even if rate limits are reached.

StatusError CodeDescription
200 OK-Email checked successfully.
400 Bad RequestINVALID_EMAIL_FORMATEmail string is empty or violates RFC syntax.
401 / 403AUTH_FAILEDMissing or invalid FadSync API Key.
429 Too Many RequestsQUOTA_EXCEEDEDMonthly quota limit reached (200 requests on Free Plan).