Verify a domain
Trigger a DNS verification pass for a sending domain with the wemail API and read back which of the SPF, DKIM and DMARC records are in place.
Checks the published DNS records live and activates the domain when they match. Call it after DNS propagation; it is safe to call repeatedly.
PUT /v3/domains/{name}/verify
DKIM is the gate: the domain flips to verified as soon as the DKIM records check out. SPF, DMARC and the tracking CNAME are checked and reported per record (dns_records[].ok) but never block verification — publish them anyway for deliverability. A verified domain is not demoted by a failed re-check.
Responses
| Status | Description |
|---|---|
200 | OK. The domain re-checked against DNS, with refreshed status and per-record ok flags. |
401 | Missing or invalid API key. |
403 | The domain is shared with you by another workspace — only its owner workspace can verify it. |
404 | No such domain on your account. |
Code examples
cURL
curl -X PUT https://api.wemail.io/v3/domains/{name}/verify \
-H "Authorization: Bearer afn_live_…"Node.js
const res = await fetch("https://api.wemail.io/v3/domains/{name}/verify", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
},
});
const data = await res.json();Python
import os, requests
r = requests.put(
"https://api.wemail.io/v3/domains/{name}/verify",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()