Verify Domain
Check a domain and update its status. Until the domain is set up, this looks for its ownership TXT record; once found, the domain is set up for sending with Cloudflare. After that, it reports whether Cloudflare has the domain enabled.
/domains/{domain_id}/verifyResend Compatibility: Compatible
Requires an API key with domains:write permission.
Path Parameters
domain_idstringrequiredThe ID of the domain to verify.
Response Fields
objectstringAlways "domain".
idstringThe domain ID.
namestringThe domain name.
statusstringpending (TXT not found yet, or Cloudflare not ready), verified (set up for sending), or failed (the domain is already set up elsewhere, or Cloudflare no longer has it — delete it and add it again).
created_atstringISO 8601 timestamp.
regionstringSending region; currently global.
capabilitiesobjectSending and receiving capability states, each enabled or disabled.
open_trackingbooleanWhether open tracking is enabled.
click_trackingbooleanWhether click tracking is enabled.
recordsarrayThe ownership DNS record, including record, type, name, value,
ttl, and status (pending, verified, or failed).
Errors
| Status | When |
|---|---|
400 | The domain is already set up for sending elsewhere, or it was added before verification existed and has to be added again. |
502 | Cloudflare could not be reached. Retry; the status is left as it was. |
curl -X POST 'https://api.postflare.dev/domains/d91cd9bd-1176-453e-8fc1-35364d380206/verify' \
-H 'Authorization: Bearer sk_xxxxxxxxx'// Set RESEND_BASE_URL=https://api.postflare.dev in the environment before
// the process starts. Without it the SDK sends to api.resend.com, silently.
import { Resend } from 'resend';
const resend = new Resend('sk_xxxxxxxxx');
const { data, error } = await resend.domains.verify(
'd91cd9bd-1176-453e-8fc1-35364d380206'
);Response
{
"object": "domain",
"id": "d91cd9bd-1176-453e-8fc1-35364d380206",
"name": "example.com",
"status": "verified",
"created_at": "2026-01-01T00:00:00.000Z",
"region": "global",
"capabilities": { "sending": "enabled", "receiving": "disabled" },
"open_tracking": true,
"click_tracking": true,
"records": [
{
"record": "Ownership",
"type": "TXT",
"name": "_postflare-verify.example.com",
"value": "postflare-verify=5f0c7e2a-8d1b-4c3e-9a6f-2b7d4e1c9a30",
"status": "verified",
"ttl": "Auto",
"priority": null
}
]
}