Verify a custom domain now
cooper_verify_domainUse this when DNS for a custom domain may have been published and you should check it now instead of waiting for the daily cron. Requires auth. Inputs: domain_id (required; the dom_… id from cooper_add_domain or cooper_list_domains). Runs the same DNS check as the cron, stores per-record status (valid, missing, or invalid), found, and hint, plus warnings, and returns the domain. hint is null when the record is valid or no specific mistake was found. warnings is an empty array when none. Which records are valid, missing, or invalid is unchanged. Fires domain.verified once when status moves from pending to verified. At most once per 60 seconds; the next call returns HTTP 429 rate_limited with Retry-After. Inboxes on your own domain are included on Starter (15 custom domains) and Pro (200 custom domains). Free includes 0 custom domains and returns HTTP 402 plan_limit_exceeded. When the hostname is already a zone on the operator Cloudflare account, Cooper writes the DNS records and dns.mode is automatic. Cooper does not register a domain or create a zone. Any other zone stays manual. Publish the routing MX hosts, TXT SPF v=spf1 include:_spf.mx.cloudflare.net ~all, the routing DKIM TXT, the cf-bounce MX, SPF, and DKIM records, a DMARC TXT (an existing DMARC record is left as it is), and the _cooper-verify TXT. mail.receiving stays false until the receiving records check out and the catch-all is live. Receiving goes live within a few minutes. status_detail says so while you wait. POST /api/v1/inboxes with domain then creates username@domain. DELETE /api/v1/domains/:id puts back the catch-all that was there before, deletes only the DNS records Cooper created, turns Email Routing off only if Cooper turned it on, and removes the sending domain only if Cooper created it. A cleanup that does not finish keeps the row with status cleanup_failed and deleted false so a later delete can finish it. Failure codes: unauthorized, domain_not_found, rate_limited.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain_id | Yes | Domain id (dom_…) from cooper_add_domain or cooper_list_domains |