API referenceMailbox orders
GET
/managed-domains

JavaScript SDK: swarmhit.managedDomains.list(params?)

The workspace's bought domains and how many more mailboxes each can take (5 per domain on Google Workspace and Microsoft 365). Add mailboxes to one with a domain entry { name, existing: true, mailboxes } in POST /mailbox-orders/quote (with X-Swarmhit-Workspace naming the domain's workspace when it is not the key's own). canAdd: false says why in reason. Not gated on the managed mailboxes feature.

By default the list is the acting workspace's own, as it always was. Optional, for an organization's key acting as the organization (no X-Swarmhit-Workspace): orgWide=true adds the domains of every workspace inside it, and workspaceId picks one of them. With either one, each domain also carries workspaceId and workspaceName.

Authorization

bearerAuth
AuthorizationBearer <token>

An API key created on the Access tokens page.

In: header

Query Parameters

orgWide?boolean

Optional, off by default. With an organization's key acting as the organization, also every workspace inside it, each row naming its workspaceId and workspaceName. Any other key keeps the acting workspace only. Without it, the answer is exactly what it always was.

Defaultfalse
workspaceId?string

Optional: only this workspace, and each row names its workspaceId and workspaceName. With an organization's key acting as the organization, any workspace of the organization (or the organization itself); otherwise only the acting workspace. Any other id is a 404 (code: not-found), so a workspace never learns whether another one exists.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/managed-domains"
{  "data": [    {      "id": "string",      "name": "string",      "workspaceId": "string",      "workspaceName": "string",      "platform": "google",      "live": 0,      "pending": 0,      "slotsLeft": 0,      "canAdd": true,      "reason": "full",      "adminEmail": "string",      "takenEmails": [        "string"      ],      "source": "purchased",      "connection": {        "state": "nameservers",        "stateLabel": "string",        "nameservers": [          "string"        ],        "currentNameservers": [          "string"        ],        "nameserversChangedAt": "2019-08-24T14:15:22Z",        "websiteRecords": [          {            "type": "A",            "host": "@",            "value": "string"          }        ],        "websiteRecordsCopied": true,        "dnssec": true,        "checkedAt": "2019-08-24T14:15:22Z",        "readyAt": "2019-08-24T14:15:22Z",        "movedAt": "2019-08-24T14:15:22Z",        "expiresAt": "2019-08-24T14:15:22Z",        "registrarExpiresAt": "2019-08-24T14:15:22Z"      },      "emailVerification": {        "status": "pending",        "deadline": "2019-08-24T14:15:22Z"      }    }  ]}

List mailbox orders GET

**JavaScript SDK:** [`swarmhit.mailboxOrders.list(params?)`](/smart-api/sdk/methods#mailboxOrders) The workspace's orders, newest first, each with its domains and mailboxes and the step each mailbox is at. By default the list is the acting workspace's own, as it always was. Optional, for an organization's key acting as the organization (no `X-Swarmhit-Workspace`): `orgWide=true` adds the orders of every workspace inside it, and `workspaceId` picks one of them. With either one, each order also carries `workspaceId` and `workspaceName`.

Price an order POST

**JavaScript SDK:** [`swarmhit.mailboxOrders.quote(params)`](/smart-api/sdk/methods#mailboxOrders) Price domains and mailboxes before buying: the lines charged now (domain registration, the first month) and every month after, in cents. Returns a `quoteId`, valid for 30 minutes, that POST /mailbox-orders needs. Charges nothing. Domains no longer available are listed in `unavailable`. Needs the managed mailboxes feature (`403`). A domain entry with `existing: true` adds mailboxes to a domain the workspace already bought (GET /managed-domains): no domain charge, only the mailboxes, which are usually ready within minutes. Addresses already taken on such a domain are listed in `unavailableMailboxes`. Refusals: `404` `domain-not-owned`, `409` `domain-full` (`details.slotsLeft`), `409` `domain-admin-cancelled` (its admin mailbox was cancelled, so it takes no new mailbox), `409` `domain-not-ready` (an own domain still connecting, or whose nameservers moved away). `contact` is only required when the order registers a new domain.