domains

Add custom domain

Add a custom domain to your account. The response includes the DNS records to publish (records). Once you publish them, the domain verifies automatically within a couple of minutes — poll GET /v1/domains/{id} until status is verified, then create inboxes on it. A pod-scoped API key creates the domain scoped to its own pod; inbox-scoped keys cannot manage domains.

post/v1/domains

Request

  • Base URL: https://api.openmail.sh
  • URL: https://api.openmail.sh/v1/domains
  • Auth: HTTP bearer

Request body

domainstring required

The domain to add, e.g. mail.acme.com. A subdomain is easiest to set up without affecting your existing mail.

podIdstring nullable

Pod to scope the domain to. Omit or null for an account-wide domain usable by any pod. A pod-scoped API key may only pass its own pod.

Response

Domain added; publish the DNS records to verify it

idstring

OpenMail domain ID

domainstring

The domain or subdomain, e.g. example.com or agent-mail.example.com.

podIdstring nullable

Pod this domain is scoped to, so only inboxes in that pod can use it, or null for an account-wide domain.

status'pending' | 'verifying' | 'verified' | 'failed' | 'under_review'

pending — added, records not yet published. verifying — being checked. verified — sending and receiving enabled. failed — records missing or wrong; publishing them and calling verify again is the fix. under_review — flagged as suspicious; DNS setup is blocked until approved.

verifiedAtstring date-time nullable
createdAtstring date-time
updatedAtstring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.