# Quick Start

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

## Your first request


**cURL**

```bash
curl --fail-with-body --max-time 10 https://disify.com/api/email \
  --data-urlencode 'email=user+tag@gmail.com'
```

**Python**

```python
import requests

response = requests.post(
    "https://disify.com/api/email",
    data={"email": "user+tag@gmail.com"},
    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**

```javascript
const response = await fetch("https://disify.com/api/email", {
  method: "POST",
  headers: { "Accept": "application/json" },
  body: new URLSearchParams({ email: "user+tag@gmail.com" }),
  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**

```php
$ch = curl_init('https://disify.com/api/email');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query(['email' => 'user+tag@gmail.com']),
    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](https://docs.disify.com/api/errors.md) 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](https://docs.disify.com/api/signals.md) for additional context.

## Catching a disposable address

```bash
curl https://disify.com/api/email/user@disposable-inbox.test
```

```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

- [Single Email Check](https://docs.disify.com/api/email.md) — GET and POST, full parameter list.
- [Domain Check](https://docs.disify.com/api/domain.md) — validate a bare domain.
- [Bulk Validation](https://docs.disify.com/api/bulk.md) — validate many addresses at once.
- [Authentication](https://docs.disify.com/guide/authentication.md) — unlock higher limits and premium features.
- [Privacy Forwarding](https://docs.disify.com/api/forwarding.md) — paid detection and configurable rejection of known privacy relays, separately from disposable mail.
- [Integrate with an AI Agent](https://docs.disify.com/guide/agents.md) — copyable setup prompt and integration test cases.

**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](https://docs.disify.com/api/plus-alias.md).

Source: https://docs.disify.com/guide/quickstart.html
