### cURL Example Source: https://docs.disify.com/ Example of how to make a request using cURL. ```bash curl https://disify.com/api/email/user@gmail.com ``` -------------------------------- ### API Key Authentication Examples Source: https://docs.disify.com/ Examples of how to authenticate using an API key with cURL. ```bash # X-Api-Key header curl -H "X-Api-Key: YOUR_API_KEY" https://disify.com/api/email/test@gmail.com # Authorization Bearer header curl -H "Authorization: Bearer YOUR_API_KEY" https://disify.com/api/email/test@gmail.com ``` -------------------------------- ### PHP Example Source: https://docs.disify.com/ Example of how to make a request using PHP. ```php $response = file_get_contents("https://disify.com/api/email/user@gmail.com"); $data = json_decode($response, true); if ($data['disposable']) { echo "Disposable email detected!"; } else { echo "Email looks legitimate."; } ``` -------------------------------- ### Python Example Source: https://docs.disify.com/ Example of how to make a request using Python. ```python import requests response = requests.get("https://disify.com/api/email/user@gmail.com") data = response.json() if data.get("disposable"): print("Disposable email detected!") else: print("Email looks legitimate.") ``` -------------------------------- ### JavaScript Example Source: https://docs.disify.com/ Example of how to make a request using JavaScript. ```javascript const response = await fetch("https://disify.com/api/email/user@gmail.com"); const data = await response.json(); if (data.disposable) { console.log("Disposable email detected!"); } else { console.log("Email looks legitimate."); } ``` -------------------------------- ### Premium Features Request Examples Source: https://docs.disify.com/ Examples of how to request premium features via URL path or query parameter. ```bash # Request SPF and DKIM checks via URL path curl -H "X-Api-Key: YOUR_KEY" https://disify.com/api/email/test@gmail.com/spf/dkim # Request multiple features via query parameter curl -H "X-Api-Key: YOUR_KEY" "https://disify.com/api/email/test@gmail.com?features=spf,dkim,dmarc" ``` -------------------------------- ### Example JSON Response Source: https://docs.disify.com/ An example of the JSON response structure. ```json { "format": true, "domain": "gmail.com", "disposable": false, "dns": true, "confidence": 0, "whitelist": true, "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" ], "role": false, "free": true } ``` -------------------------------- ### Flagged plus-alias example Source: https://docs.disify.com/ Example JSON response when a plus-alias is detected on a legitimate provider. ```json { "format": true, "alias": true, "domain": "gmail.com", "disposable": true, "dns": true, "whitelist": true, "confidence": 100, "signals": ["alias_base_exact"] } ``` -------------------------------- ### GET Request for Domain Check Source: https://docs.disify.com/ Example cURL command to check a domain name directly. ```curl curl https://disify.com/api/domain/guerrillamail.com ``` -------------------------------- ### GET Request for Bulk Email Validation Source: https://docs.disify.com/ Example cURL command to validate multiple email addresses in a single request using the GET method. ```curl curl "https://disify.com/api/email/user@gmail.com,test@tempmail.com/mass" ``` -------------------------------- ### GET Request for Single Email Check Source: https://docs.disify.com/ Example cURL command to validate a single email address using the GET method. ```curl curl https://disify.com/api/email/user@tempmail.com ``` -------------------------------- ### Example Bulk Response Source: https://docs.disify.com/ This is an example of the JSON response received after a bulk email validation request. ```json { "total": 3, "invalid_format": 0, "invalid_dns": 0, "disposable": 1, "unique": 3, "valid": 2, "session": "d117271ce938bf91bc718f6cfb7954de" } ``` -------------------------------- ### Pro tier response example Source: https://docs.disify.com/ Example JSON response for the Pro tier, detailing various email authentication and domain information. ```json { "format": true, "domain": "example.com", "disposable": false, "dns": true, "confidence": 0, "domain_info": { "tld": "com", "is_subdomain": false, "parent_domain": null }, "mx_info": ["mx1.example.com", "mx2.example.com"], "spam_trap": { "is_trap": false, "type": null, "reason": null }, "email_auth": { "spf": "pass", "spf_record": "v=spf1 include:_spf.google.com ~all", "dmarc": { "policy": "reject", "record": "v=DMARC1; p=reject; rua=mailto:dmarc@example.com", "subdomain_policy": "quarantine", "pct": 100, "rua": "mailto:dmarc@example.com" }, "dkim_configured": true, "dkim_selectors_found": ["google", "selector1"] }, "domain_age": { "registered": "2015-06-01", "age_days": 3848, "fresh": false }, "inbox_provider": "Google Workspace", "deliverability_score": 100, "role": false, "free": false } ``` -------------------------------- ### Progress response for async bulk jobs. Source: https://docs.disify.com/ Example JSON response while an async bulk job is processing, showing progress. ```json { "session": "d117271ce938bf91bc718f6cfb7954de", "status": "processing", "email_count": 8000, "processed_count": 3200 } ``` -------------------------------- ### Error Response Source: https://docs.disify.com/ Example JSON response for a malformed request or missing parameters. ```json { "error": "Invalid request" } ``` -------------------------------- ### Retrieve bulk results as a comma-separated file download. Source: https://docs.disify.com/ Example cURL command to fetch valid email addresses as a comma-separated file, forcing a download. ```curl # Comma-separated + download curl https://disify.com/api/view/d117271ce938bf91bc718f6cfb7954de/separator/download ``` -------------------------------- ### Response for a disposable email Source: https://docs.disify.com/ Example JSON response when a disposable email address is detected. ```json { "format": true, "domain": "tempmail.com", "disposable": true, "dns": true, "confidence": 100, "domain_info": { "tld": "com", "is_subdomain": false, "parent_domain": null }, "mx_info": ["mx1.tempmail.com"], "signals": [ "keyword_match", "mx_blacklist_exact" ], "role": false, "free": false } ``` -------------------------------- ### Retrieve bulk results using a session hash. Source: https://docs.disify.com/ Example cURL command to fetch valid email addresses using the session hash obtained from a bulk request. ```curl curl https://disify.com/api/view/d117271ce938bf91bc718f6cfb7954de ``` -------------------------------- ### Send a POST request to the email API with the 'bulk' parameter. Source: https://docs.disify.com/ This example shows how to send a bulk email validation request using PHP. ```php $ch = curl_init("https://disify.com/api/email"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ "bulk" => true, "email" => "user@gmail.com,test@tempmail.com,info@example.org" ])); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); ``` -------------------------------- ### Send a POST request to the email API with the 'bulk' parameter. Source: https://docs.disify.com/ This example shows how to send a bulk email validation request using cURL. ```curl curl -X POST https://disify.com/api/email \ -d "bulk=true" \ -d "email=user@gmail.com,test@tempmail.com,info@example.org" ``` -------------------------------- ### Pending response for async bulk jobs (> 500 emails). Source: https://docs.disify.com/ Example JSON response when a bulk job is queued due to a large number of emails. ```json { "session": "d117271ce938bf91bc718f6cfb7954de", "status": "pending", "email_count": 8000, "estimated_seconds": 32 } ``` -------------------------------- ### POST Request for Single Email Check (cURL) Source: https://docs.disify.com/ Example cURL command to validate a single email address using the POST method. ```curl curl -X POST https://disify.com/api/email \ -d "email=user@tempmail.com" ``` -------------------------------- ### Send a POST request to the email API with the 'bulk' parameter. Source: https://docs.disify.com/ This example shows how to send a bulk email validation request using Python's requests library. ```python import requests response = requests.post("https://disify.com/api/email", data={ "bulk": True, "email": "user@gmail.com,test@tempmail.com,info@example.org" }) print(response.json()) ``` -------------------------------- ### POST Request for Single Email Check (PHP) Source: https://docs.disify.com/ Example PHP code using cURL to validate a single email address via POST. ```php $ch = curl_init("https://disify.com/api/email"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, "email=user@tempmail.com"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); ``` -------------------------------- ### POST Request for Single Email Check (JavaScript) Source: https://docs.disify.com/ Example JavaScript code using the fetch API to validate a single email address via POST. ```javascript const response = await fetch("https://disify.com/api/email", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: "email=user@tempmail.com" }); const data = await response.json(); ``` -------------------------------- ### POST Request for Single Email Check (Python) Source: https://docs.disify.com/ Example Python code using the requests library to validate a single email address via POST. ```python import requests response = requests.post("https://disify.com/api/email", data={ "email": "user@tempmail.com" }) print(response.json()) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.