Mailboxes

Order mailboxes

POST
/v1/mailboxes

Orders Google mailboxes on a domain, by its name or id: the one call you need. A domain you bought here needs nothing else: we point its nameservers ourselves, keep its existing records (website, verifications), and the mailboxes are set up as soon as it is ready (nameserversManaged: true). For a domain registered elsewhere, set the nameservers in mailboxDomain at its registrar; the mailboxes wait, paid for, and are set up once it points there. A domain nobody has registered is checked with the registrar first: send buy: true to register it (a year, to the registrant on the customer or your account default) before its mailboxes are ordered, or leave it off and get domain_not_registered, with nothing held or charged. A premium name is never bought here, whatever buy says (premium_domain). Order more later the same way, up to 10 per domain. Each month is held from your wallet now (checked first, so a short balance changes nothing) and only taken once that mailbox is set up. Send an Idempotency-Key header so a retry never orders twice.

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

buy?boolean

Register the domain first: for one checkMailboxDomains would say is available

mailboxes*array<>
Items1 <= items <= 10

Response Body

Created

application/json
  1. response

Created

mailboxDomain*

The domain the mailboxes are on, connected by this call if it was not yet

data*array<>
registeredDomainId*|

The domain bought for this order, when buy registered one

curl -X POST "https://example.com/v1/mailboxes" \  -H "Idempotency-Key: 2f1c9a52-7d0e-4a8e-9a53-0c1f6f3f2b11" \  -H "Content-Type: application/json" \  -d '{    "mailboxes": [      {        "username": "jo",        "firstName": "Jo",        "lastName": "Bloggs"      }    ]  }'
{  "mailboxDomain": {    "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"  },  "data": [    {      "id": "mbx_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",      "mailboxDomainId": "mdm_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",      "email": "[email protected]",      "username": "jo",      "firstName": "Jo",      "lastName": "Bloggs",      "profilePictureUrl": "string",      "isAdmin": true,      "status": "queued",      "setupStage": "configuring_dns",      "failure": {        "code": "DOMAIN_IN_USE_GOOGLE",        "message": "Domain is already in use in Google Workspace."      },      "customerId": "cus_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",      "activatedAt": "2026-10-07T11:04:31.000Z",      "actor": {        "kind": "user",        "label": "string"      },      "createdAt": "2026-10-07T11:04:31.000Z"    }  ],  "registeredDomainId": "dom_01K6XJ4Q8ZT3M9R5V2B7WDHNCA"}