Validate an address

Check whether an email address is deliverable before you send.

Verification checks syntax, domain/MX, catch-all and mailbox existence and returns a deliverability verdict. It is asynchronous: the call returns immediately and the result is delivered to webhook_url (if supplied) and can be fetched via GET /v3/validate/{id}.

POST /v3/validate

Body parameters

ParameterTypeRequiredDescription
addressstringRequiredThe address to verify (max 320 chars). Normalised and lowercased before checking.
webhook_urlstring (URL)OptionalWhere to POST the finished verdict. Optional — polling works either way. Must be a public HTTPS URL.

Responses

StatusDescription
202Accepted. { verification_id, address, result: "unknown", sub_status: "queued" } — the probe runs asynchronously.
400Validation error — missing or over-length address, or an invalid webhook_url.
401Missing or invalid API key.
402Insufficient credits. A live verification costs 1 verification credit; the account's credit balance is empty. Buy a credit pack and retry. Test keys are exempt.
429The 100 requests/min verification limit or your account request rate was exceeded.

Poll GET /v3/validate/{id} (see Get a validation result) until sub_status leaves queued — the completed verdict includes result, recommendation, confidence, risk, MX details, and flags like is_disposable and is_role_address. See Results & statuses for how to read them.

Code examples

cURL
curl -X POST https://api.wemail.io/v3/validate \
  -H "Authorization: Bearer afn_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "address": "user@example.com", "webhook_url": "https://yourapp.com/verify-hook" }'
Node.js
const res = await fetch("https://api.wemail.io/v3/validate", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ "address": "user@example.com", "webhook_url": "https://yourapp.com/verify-hook" }),
});
const data = await res.json();
Python
import os, requests

r = requests.post(
    "https://api.wemail.io/v3/validate",
    headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
    json={ "address": "user@example.com", "webhook_url": "https://yourapp.com/verify-hook" },
)
data = r.json()