You wanted a function, not a vendor relationship
Verifying an email should be one API call, not a project. Sign up, get a key and start calling it. There's no demo to book and no contract to sign.
You wanted a function that takes a string and tells you whether mail will land.
How it works
- 1
POST /api/v1/verify/singlewith an email address. Get back a status and the signals behind it. - 2Branch on
status. Decide what your app should do with each result, such as valid, invalid or unknown. - 3Batch when you have a list.
POST /api/v1/verify/bulk, then poll for the result.
import requests
r = requests.post(
"https://bouncelayer.com/api/v1/verify/single",
headers={"X-API-Key": API_KEY},
json={"email": email},
timeout=3,
)
result = r.json()
if result["result"]["status"] == "invalid" or result["result"]["is_disposable"]:
raise ValidationError("Please use a valid work email address.")const res = await fetch("https://bouncelayer.com/api/v1/verify/single", {
method: "POST",
headers: {
"X-API-Key": process.env.BOUNCELAYER_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ email }),
});
const { result } = await res.json();
const { status, is_disposable } = result;Integration notes we would want if we were you
- Always set a timeout and fail open. If verification times out, let the signup through and flag it for an asynchronous re-check. Never let a third-party API block your registration flow.
- Cache by address. Don't pay twice for the same address in one session.
- Verify server-side. An API key in client-side JavaScript is a key someone else's script will spend.
- Handle unknown results on purpose. Some mail servers won't give an answer, so the status comes back unknown. You aren't charged for these. Decide once whether unknown passes or fails in your flow, and write it down.