Skip to content
View Markdown

Quick Start

No signup or API key needed. Make your first request in seconds.

Your first request

bash
curl --fail-with-body --max-time 10 https://disify.com/api/email \
  --data-urlencode '[email protected]'
python
import requests

response = requests.post(
    "https://disify.com/api/email",
    data={"email": "[email protected]"},
    headers={"Accept": "application/json"},
    timeout=10,
    allow_redirects=False,
)
if response.status_code != 200:
    raise RuntimeError(f"DISIFY check unavailable: HTTP {response.status_code}")
data = response.json()

if not isinstance(data, dict) or type(data.get("format")) is not bool:
    raise ValueError("Unexpected DISIFY response")
if data["format"] is False:
    print("Invalid email format.")
else:
    if any(type(data.get(field)) is not bool for field in ("disposable", "dns")):
        raise ValueError("Incomplete DISIFY response")
    signals = data.get("signals", [])
    if not isinstance(signals, list) or not all(isinstance(signal, str) for signal in signals):
        raise ValueError("Unexpected DISIFY signals")
    if data["disposable"]:
        print("Disposable email detected.")
    elif "dns_indeterminate" in signals:
        print("DNS check inconclusive; retry later.")
    elif not data["dns"]:
        print("No usable mail DNS found.")
    else:
        print("Core checks passed; mailbox ownership is not verified.")
javascript
const response = await fetch("https://disify.com/api/email", {
  method: "POST",
  headers: { "Accept": "application/json" },
  body: new URLSearchParams({ email: "[email protected]" }),
  signal: AbortSignal.timeout(10000),
  redirect: "error",
});
if (response.status !== 200) {
  throw new Error(`DISIFY check unavailable: HTTP ${response.status}`);
}
const data = await response.json();

if (!data || typeof data.format !== "boolean") {
  throw new Error("Unexpected DISIFY response");
}
if (data.format === false) {
  console.log("Invalid email format.");
} else {
  if (typeof data.disposable !== "boolean" || typeof data.dns !== "boolean") {
    throw new Error("Incomplete DISIFY response");
  }
  const signals = data.signals === undefined ? [] : data.signals;
  if (!Array.isArray(signals) || !signals.every(signal => typeof signal === "string")) {
    throw new Error("Unexpected DISIFY signals");
  }
  if (data.disposable) {
    console.log("Disposable email detected.");
  } else if (signals.includes("dns_indeterminate")) {
    console.log("DNS check inconclusive; retry later.");
  } else if (!data.dns) {
    console.log("No usable mail DNS found.");
  } else {
    console.log("Core checks passed; mailbox ownership is not verified.");
  }
}
php
$ch = curl_init('https://disify.com/api/email');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query(['email' => '[email protected]']),
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => false,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($response === false || $status !== 200) {
    throw new RuntimeException("DISIFY check unavailable: HTTP {$status}");
}
$data = json_decode($response, true, 512, JSON_THROW_ON_ERROR);
if (!is_array($data) || !is_bool($data['format'] ?? null)) {
    throw new RuntimeException('Unexpected DISIFY response');
}
if ($data['format'] === false) {
    echo 'Invalid email format.';
} else {
    if (!is_bool($data['disposable'] ?? null) || !is_bool($data['dns'] ?? null)) {
        throw new RuntimeException('Incomplete DISIFY response');
    }
    $signals = array_key_exists('signals', $data) ? $data['signals'] : [];
    if (!is_array($signals) || !array_is_list($signals) || count(array_filter($signals, 'is_string')) !== count($signals)) {
        throw new RuntimeException('Unexpected DISIFY signals');
    }
    if ($data['disposable']) {
        echo 'Disposable email detected.';
    } elseif (in_array('dns_indeterminate', $signals, true)) {
        echo 'DNS check inconclusive; retry later.';
    } elseif (!$data['dns']) {
        echo 'No usable mail DNS found.';
    } else {
        echo 'Core checks passed; mailbox ownership is not verified.';
    }
}

Run these examples on the backend and keep API keys server-side. Connect HTTP, network, and parsing failures to your application's unavailable-check policy. See Error Handling for retry guidance. The 10-second timeout is an example client setting.

Example response

json
{
  "format": true,
  "alias": true,
  "domain": "gmail.com",
  "disposable": false,
  "dns": true,
  "whitelist": true,
  "confidence": 0,
  "domain_info": { "tld": "com", "is_subdomain": false, "parent_domain": null },
  "mx_info": [
    "gmail-smtp-in.l.google.com",
    "alt1.gmail-smtp-in.l.google.com",
    "alt2.gmail-smtp-in.l.google.com",
    "alt3.gmail-smtp-in.l.google.com",
    "alt4.gmail-smtp-in.l.google.com"
  ],
  "role": false,
  "free": true
}

After checking HTTP status and format, use disposable as the disposable-detection verdict. Apply your own DNS and unavailable-check policy separately. Passing these checks does not prove mailbox ownership or guarantee delivery. See signals for additional context.

Catching a disposable address

bash
curl https://disify.com/api/email/[email protected]
json
{
  "format": true,
  "domain": "disposable-inbox.test",
  "disposable": true,
  "dns": false,
  "confidence": 100,
  "signals": ["keyword_match", "no_mx_records"],
  "domain_info": { "tld": "test", "is_subdomain": false, "parent_domain": null },
  "role": false,
  "free": false
}

Where to go next

Don't skip popular providers

DISIFY detects temp-mail services that hand out plus-aliases on real Gmail, Outlook, and iCloud mailboxes. If you skip those domains client-side, you'll miss this class of abuse. A cached domain verdict must not replace an individual email check. See Plus-Alias Detection.

Free disposable email detection API · Terms · Privacy