Skip to Content
ExamplescURL Examples

cURL Examples

All examples assume your API key is stored in the VERIFNOW_API_KEY environment variable.

export VERIFNOW_API_KEY=your_api_key_here

Validate an email

curl -X POST https://api.verifnow.io/api/v1/validate/email \ -H "X-API-KEY: $VERIFNOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value": "user@example.com"}'

Response:

{ "valid": true, "message": "Email address is valid but has risk factors", "normalizedValue": "user@example.com", "originalValue": "user@example.com", "validationLevel": "PREMIUM", "emailDetails": { "signals": { "syntax_valid": true, "mx_valid": true, "typo_detected": false, "suggested_domain": null, "disposable": false, "role_based": false, "free_provider": false, "domain_age_days": 11554, "mx_provider": "google", "mx_quality_score": 0.9 }, "risk_score": 30, "risk_level": "MEDIUM", "deliverability": "RISKY", "applied_level": "PREMIUM" } }

Detect a disposable email

curl -X POST https://api.verifnow.io/api/v1/validate/email \ -H "X-API-KEY: $VERIFNOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value": "throwaway@mailinator.com"}'

Response:

{ "valid": true, "message": "Email address is valid but has high risk", "normalizedValue": "throwaway@mailinator.com", "originalValue": "throwaway@mailinator.com", "validationLevel": "PREMIUM", "emailDetails": { "signals": { "syntax_valid": true, "mx_valid": true, "typo_detected": false, "suggested_domain": null, "disposable": true, "role_based": false, "free_provider": false, "domain_age_days": 7300, "mx_provider": "mailinator", "mx_quality_score": 0.1 }, "risk_score": 90, "risk_level": "HIGH", "deliverability": "RISKY", "applied_level": "PREMIUM" } }

Validate an email with a typo

curl -X POST https://api.verifnow.io/api/v1/validate/email \ -H "X-API-KEY: $VERIFNOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value": "user@gmal.com"}'

Response:

{ "valid": false, "message": "Email address is unlikely to be deliverable", "normalizedValue": "user@gmal.com", "originalValue": "user@gmal.com", "validationLevel": "PREMIUM", "emailDetails": { "signals": { "syntax_valid": true, "mx_valid": false, "typo_detected": true, "suggested_domain": "gmail.com", "disposable": false, "role_based": false, "free_provider": false, "domain_age_days": null, "mx_provider": null, "mx_quality_score": 0.0 }, "risk_score": 95, "risk_level": "HIGH", "deliverability": "UNDELIVERABLE", "applied_level": "PREMIUM" } }

Validate a phone number

curl -X POST https://api.verifnow.io/api/v1/validate/phone \ -H "X-API-KEY: $VERIFNOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value": "+15551234567"}'

Pretty-print with jq

Use jq to format and filter responses:

# Get just the validity curl -s -X POST https://api.verifnow.io/api/v1/validate/email \ -H "X-API-KEY: $VERIFNOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value": "user@example.com"}' | jq '.valid' # Check if disposable curl -s -X POST https://api.verifnow.io/api/v1/validate/email \ -H "X-API-KEY: $VERIFNOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value": "user@example.com"}' | jq '.emailDetails.signals.disposable' # Get risk level curl -s -X POST https://api.verifnow.io/api/v1/validate/email \ -H "X-API-KEY: $VERIFNOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value": "user@example.com"}' | jq '.emailDetails.risk_level' # Get typo suggestion if available curl -s -X POST https://api.verifnow.io/api/v1/validate/email \ -H "X-API-KEY: $VERIFNOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value": "user@gmal.com"}' | jq '.emailDetails.signals.suggested_domain'

Bulk (batch) validation is not yet available. For now, validate one item at a time.

Last updated on