Register a new custom sending domain with AgentMail and auto-sync DKIM/SPF/DMARC records via Cloudflare.
CF_API_TOKEN, triggers verification, and schedules the domain-verify-poller background task to converge status as DNS propagates.
Sending domains unlock creating email inboxes under that domain via createEmailAccount. Until a domain is verified, no inboxes can be provisioned on it.
/api/email/domains with the list verb. See List sending domains to enumerate domains already registered.createEmailDomain — AgentMail issues DKIM/SPF/DMARC records; if Cloudflare is the authoritative DNS provider and CF_API_TOKEN is configured for the caller’s zone, records are written automatically and verification is triggered.status stays pending — the user must add the DNS records at their provider manually, then call verifyEmailDomain (no ?poll=true) once.domain-verify-poller background task re-checks AgentMail on an exponential-backoff schedule (10m, 20m, 40m, 80m, 160m, 320m) for up to 12 hours.verified the domain, you get a 409.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Only domain is accepted. The handler creates the domain in AgentMail, auto-syncs the DKIM/SPF/DMARC records to Cloudflare when the zone is managed by the caller's Cloudflare account, triggers verification if DNS was synced, and schedules the domain-verify-poller background task to converge status.
Apex or subdomain to register. Lowercased server-side. Must match ^[a-z0-9](…)+\.[a-z]{2,}$.
Domain created. status is verified if DNS was already in place, verifying if the poller has been scheduled, or pending if Cloudflare sync failed and the user must add records manually.
A custom sending domain. Domains are created in AgentMail, optionally auto-synced to Cloudflare, and then polled (via the domain-verify-poller background task) until AgentMail confirms DNS propagation.