Get started
Moving from v1
v2 covers everything v1 does with one consistent shape. You can move one call at a time: v1 and v2 work on the same data.
Main differences
| v1 | v2 | |
|---|---|---|
| Base URL | https://server. | https://api. |
| Tokens | Read or write access | Scopes per area, e.g. orders:read, purchases:write |
| Workspace | ?organization_ | Workspace: org_ header |
| Ids | Mixed (org_, sub_, UUIDs) | Prefixed: org_, ord_ ... (a domain is its name, a mailbox its email address) |
| Names | Mixed camelCase and snake_case | snake_ everywhere |
| Money | Dollars | Dollars as a number (25.) |
| Errors | Two shapes | One shape with type and code |
| Lists | Some bare arrays, some unpaged | Always { data }; long lists paged with a cursor (has_, next_), up to 100 per page |
| Ordering | Four create-order routes | One: POST /orders |
| Changes to live orders | Send and forget | Change requests you can list, read and cancel |
| Webhooks | Set up in the portal | Set up in the app; the same events as v1 |
v1 and v2 share your data: an order placed with v1 shows in v2, and the other way round. The workspace id is the same org_ id as in v1 and the app; an order's sub_ is ord_ in v2. v1 tokens don't work on v2 and v2 tokens don't work on v1 (401 wrong_): make a v2 token in Settings › API tokens. Sub-workspaces are only reachable with v2.
Route by route
| v1 | v2 | Notes |
|---|---|---|
GET /organizations | GET /workspaces | Includes parent_ (sub-workspaces). |
POST /organizations | POST /workspaces | parent_ makes a sub-workspace. |
GET /packages | GET /products | Prices in dollars, as in v1. |
POST /calculate-package | POST /quotes | A price preview, with tier and a price per line. To buy it, send the domains to POST /orders. |
POST /search-domains | POST /domains/availability | |
POST /suggest-domains | POST /domains/suggestions | |
POST /buy-domains | POST /domain-purchases | Each name shows in GET /domains as unused once paid. |
GET /domains | GET /domains | Up to 100 per page with a cursor; GET /domains/:domain reads one. |
GET /purchased-domains | GET /domains | Filter for domains not in an order yet. |
GET /domain-masking | GET /masking-domains | Also lists external masking-only domains, which GET /domains leaves out. |
POST /create-order/:price_ | POST /orders | One route for every kind of order. Send the same price_ as package (it is in GET /products). The coupon query parameter is now a coupon field in the body. See the Package on own domains example on Create order. |
POST /create-custom-order | POST /orders | Leave out package: you pay for the domains you send (Google per mailbox, Outlook and SMTP per domain). See the Google + Outlook on new domains example. |
POST /buy-pre-warm-inboxes | POST /prewarmed-orders | Send the name of each domain. |
GET /orders | GET /orders | |
GET /orders/:uuid | GET /orders/:id | |
PATCH /orders/:uuid/tag | PATCH /orders/:id | Change tag. |
POST /orders/:uuid/cancel-domains | POST /orders/:id/remove-domains | |
DELETE /orders/:uuid | POST /orders/:id/cancel | |
POST /swap-domain/:old_ | POST /change-requests | With a replace_ block; several changes can go in one request. |
POST /swap-redirect/:old_ | POST /change-requests | With a redirect block. |
POST /swap-sender-name/:old_ | POST /change-requests | With a sender_ block. |
POST /swap-domain-masking/:old_ | POST /change-requests | With a masking block. |
GET /mailboxes/:domain | GET /mailboxes?domain=demo-domain-1. | Passwords: include=credentials instead of ?password=true. |
GET /generate-aliases | POST /alias-suggestions | Now needs a token, and counts as a read call (300 a minute per token). |
GET /pre-warm-inboxes | GET /prewarmed-inventory | |
GET /reporting | GET /reports | Same idea: one row per domain per week. Filter by domain, order_ or week_. |
Webhook events
Nothing changes: webhooks are set up in the app, and your endpoint gets the same events, body, headers and signature as with v1 (order_, order_, order_).
A safe order of work
- Make a v2 token with only
:readscopes and try your read calls first. - Then move changes, and purchases last.
- Each purchase call charges the card: after a timeout, check
GET /ordersbefore sending it again. - Change your error handling to
error..code - When nothing calls v1 any more, revoke your v1 tokens.
