MailboxesDomains

Connect a domain

POST
/v1/mailbox-domains

Connects a domain without ordering anything, for when you want its nameservers before you buy: most often a domain registered elsewhere, so they can be set at its registrar ahead of time. Not needed otherwise: ordering mailboxes connects the domain by itself. Free.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the Developers page. rhq_test_ keys reach the sandbox, rhq_live_ keys the live side.

Header Parameters

Idempotency-Key?string

A value unique to this request, such as a UUID. A retry with the same key within 24 hours returns the first outcome instead of running again.

Length8 <= length <= 200

Request Body

application/json
  1. body
domain?string

The domain by name: one registered elsewhere, or one you hold here

Length3 <= length <= 253
domainId?string

A domain you hold here, by its id

customerId?string

Who this is for. Defaults to the customer a domain held here was bought for; required for any other domain

moveNameservers?boolean

Only for a domain held here whose DNS you pointed elsewhere (domain_dns_elsewhere): move it to mail nameservers anyway. Its records there are not copied

Response Body

Created

application/json
  1. response

Created

id*string
domain*string
status*string

awaiting_domain while a domain bought with the order is still being registered; awaiting_nameservers until the domain points at nameservers; propagating once we have pointed a domain held here ourselves; active when mailboxes can be set up on it; failed when it never pointed there in time (regenerate the nameservers and try again); deleting then deleted once you delete it

Value in"awaiting_domain""awaiting_nameservers""propagating""active""failed""deleting""deleted"
source*string

resellerhq for a domain you hold here, whose nameservers we change for you; external for one registered elsewhere, whose nameservers you change at its registrar

Value in"resellerhq""external"
domainId*|

The domain held here, for resellerhq

nameserversManaged*boolean

True when we point the domain at nameservers ourselves (a domain held here): there is nothing for you to do. False when you set them at its registrar

nameservers*array<string>

Where the domain must point. Its DNS is hosted there from then on

failure*|

Why the domain is failed

customerId*string|null
unitPrice*integer

What you pay per mailbox per month on this domain, fixed when it was connected

Range0 <= value
customerPrice*|

What the customer pays per mailbox, when fixed here

periodEndsAt*|

When the month paid for ends. Every set-up mailbox on the domain renews together then. Null until the first mailbox is ordered

unpaidSince*|

When the renewal now due first could not be charged. Null when nothing is owed

deletesAt*|

When an unpaid domain is deleted with its mailboxes. Add funds before then

forwarding*|

Where the domain's website redirects

dmarc*|null
actor*|

Who did it; null for anything done before we recorded that

createdAt*string
Formatdate-time
curl -X POST "https://example.com/v1/mailbox-domains" \  -H "Idempotency-Key: 2f1c9a52-7d0e-4a8e-9a53-0c1f6f3f2b11" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "mdm_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",  "domain": "northwind-mail.com",  "status": "awaiting_domain",  "source": "resellerhq",  "domainId": "dom_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",  "nameserversManaged": true,  "nameservers": [    "ns1.example-dns.net"  ],  "failure": {    "code": "DOMAIN_IN_USE_GOOGLE",    "message": "Domain is already in use in Google Workspace."  },  "customerId": "cus_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",  "unitPrice": 450,  "customerPrice": 450,  "periodEndsAt": "2026-10-07T11:04:31.000Z",  "unpaidSince": "2026-10-07T11:04:31.000Z",  "deletesAt": "2026-10-07T11:04:31.000Z",  "forwarding": {    "url": "https://northwind.com",    "captcha": true  },  "dmarc": {    "reportingEmail": "string",    "policy": "none",    "subdomainPolicy": "none",    "percentage": 0  },  "actor": {    "kind": "user",    "label": "string"  },  "createdAt": "2026-10-07T11:04:31.000Z"}