Bulk Email Validation Code Examples

Utilities
POST /api/v1/email/validate/bulk Bearer

Ready-to-run Bulk Email Validation calls. Replace YOUR_API_KEY with the key from your dashboard.

Bulk Email Validation — Code Samples

cURL
PHP
Fetch
jQuery
Axios
Python
curl -X POST https://app.way2api.com/api/v1/email/validate/bulk \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"emails":["[email protected]","not-an-email"]}'

Expected Response — 200

{
    "status": "SUCCESS",
    "status_code": 200,
    "charged": true,
    "success": true,
    "message": "",
    "message_code": "OK",
    "order_id": "W2A1739512345abcdef01",
    "data": {
        "order_id": "W2A1739512345abcdef01",
        "result": {
            "total_requested": 3,
            "total_returned": 3,
            "results": [
                {
                    "email": "[email protected]",
                    "result": "valid",
                    "is_valid": true,
                    "is_syntax_valid": true,
                    "reason": "",
                    "domain": {
                        "name": "example.com",
                        "is_valid": true,
                        "is_disposable": false,
                        "is_free": false,
                        "is_spam": false,
                        "is_catch_all": false
                    },
                    "account": {
                        "is_role": false,
                        "is_full_mailbox": false
                    },
                    "mx_records": [
                        "mx1.example.com.",
                        "mx2.example.com.",
                        "mx3.example.com.",
                        "mx4.example.com.",
                        "mx5.example.com."
                    ]
                },
                {
                    "email": "not-an-email",
                    "result": "invalid_syntax",
                    "is_valid": false,
                    "is_syntax_valid": false,
                    "reason": "",
                    "domain": {
                        "name": "not-an-email",
                        "is_valid": false,
                        "is_disposable": false,
                        "is_free": false,
                        "is_spam": false,
                        "is_catch_all": false
                    },
                    "account": {
                        "is_role": false,
                        "is_full_mailbox": false
                    },
                    "mx_records": []
                },
                {
                    "email": "[email protected]",
                    "result": "invalid",
                    "is_valid": false,
                    "is_syntax_valid": true,
                    "reason": "mx record does not exist.",
                    "domain": {
                        "name": "nonexistentdomainxyz123abc.com",
                        "is_valid": false,
                        "is_disposable": false,
                        "is_free": false,
                        "is_spam": false,
                        "is_catch_all": false
                    },
                    "account": {
                        "is_role": false,
                        "is_full_mailbox": false
                    },
                    "mx_records": []
                }
            ]
        }
    }
}