Verification rules
Create account-level allow and block rules used by every verification request.
Verification rules let you allow or block an exact email, domain, top-level domain, or MX provider before a DNS or SMTP probe runs. This endpoint lists every rule on the account, newest first.
GET /v3/validate/rules
Responses
| Status | Description |
|---|---|
200 | OK. { items: [{ id, rule_type, value, action, priority, reason, created_at }] }. |
401 | Missing or invalid API key. |
How rules are applied
Rules run as an early step of the verification engine: a block rule short-circuits matching addresses to do_not_mail and an allow rule forces them valid, in both cases skipping the probe. Manage them with POST /v3/validate/rules (Create a verification rule) and DELETE /v3/validate/rules/{ruleId} (Delete a verification rule).
Code examples
cURL
curl https://api.wemail.io/v3/validate/rules \
-H "Authorization: Bearer afn_live_…"Node.js
const res = await fetch("https://api.wemail.io/v3/validate/rules", {
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
},
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://api.wemail.io/v3/validate/rules",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()