Orders
Add domains
Add more domains with their mailboxes to an order. The card is charged now for the rest of the current period, and the order renews for more from then on.
https://api.scaledmail.com/v2/orders/:id/add-domains- Token access
- Can buy
- Rate limit
- Purchase: 20 calls per minute per token
Every call charges the card. If a call times out, look in GET /orders/:id before you try again.
Only domains you already bought or your own. To add new names, buy them first with POST /domain-purchases, then add them here with domain_.
Everything is checked before charging: a 4xx answer means nothing was charged. The order's add-ons (Reporting, Domain Masking) cover the new domains too.
Path parameters
idstringrequiredThe order id (
ord_).. . .
Headers
AuthorizationstringrequiredBearer <your API token>. Tokens start withsm_.live_ WorkspacestringrequiredThe workspace id to act on (from
GET /workspacesor Settings › API tokens). Required on every call except the/workspacescalls; without it:400workspace_.required
Body
domain_sourceenumrequiredWhere the new domains come from.
purchased: domains you bought from us and haven't used yet (GET /domains?status=unused; buy new ones first withPOST /domain-purchases).own: your domains, registered elsewhere (addconnections.so we can set up their DNS). One source per call.hosting One of:
purchasedowndomainsobjectrequiredThe new domains and their mailboxes, per provider, as in
POST /orders. At least one domain (parameter_). When the order has Domain Masking, every new domain needsmissing forwarding.; without it,type: masking maskingis refused.ShowHide child fields
googleobjectoptionalGoogle Workspace domains.
ShowHide child fields
mailboxes_per_domainintegeroptional2 to 3Google mailboxes on every new domain, 2 or 3. Default: what the order's Google domains have now (2 when the order has no Google yet).
domainsobject[]required1 to 200 itemsThe Google domains, 1 to 200.
ShowHide child fields
namestringrequired1 to 253 charactersThe domain name, like
demo-domain-1.(lower-cased for you). No subdomains, nocom www.. Each name only once per order. Withdomain_: a domain you bought from us and haven't used yet (source: purchased GET /domains?status=unused).mailboxesobject[]optional1 to 25 itemsOne entry per mailbox. Google:
mailboxes_entries (default 2); Outlook: exactly 25; SMTP: exactly 4 (elseper_ domain mailbox_). Withcount_ mismatch subdomains: Googlemailboxes_× subdomains, Outlook still 25, SMTP 4 × subdomains; they are spread over the subdomains in order (Google 2 per subdomain withper_ domain ["mail", "team"]: the first 2 onmail., the next 2 onteam.; Outlook 25 over 3: 9 / 8 / 8), and each alias only once per domain. Sendmailboxesorsender(exactly one of the two) on every domain, and use the same one for every domain of a provider.ShowHide child fields
aliasstringrequired1 to 64 charactersThe part before the
@, likejane.. Letters, numbers,doe .,_and-; may not start or end with a symbol; no@or spaces. Unique within the domain (case is ignored).first_namestringrequired1 to 50 charactersSender first name.
last_namestringrequired1 to 50 charactersSender last name.
profile_picture_urlstringoptionalat most 150 charactersAn
httporhttpslink to a profile picture (no base64 data). Ignored for SMTP.
senderobjectoptionalInstead of
mailboxes: one sender name for every mailbox of the domain, and we make the addresses for you (jane.,doe janedoe...). If no addresses can be made from the name:invalid_.name ShowHide child fields
first_namestringrequired1 to 50 charactersSender first name.
last_namestringrequired1 to 50 charactersSender last name.
profile_picture_urlstringoptionalat most 150 charactersAn
httporhttpslink to a profile picture for every mailbox (no base64 data). Ignored for SMTP.
forwardingobjectoptionalWhat visitors of the domain's website see. Left out = no forwarding. With the
maskingadd-on every domain needstype: masking(masking_); without it,target_ required maskingis refused (masking_).add_ on_ required ShowHide child fields
typeenumrequiredredirect: visitors of the domain are sent tourl.masking: the domain shows the site ofmasking_; needs thetarget maskingadd-on.One of:
redirectmaskingurlstringoptional1 to 2048 charactersOnly with
redirect, and required there: where visitors go, likedemo-domain-9.(com/page https://is optional).masking_targetstringoptional1 to 253 charactersOnly with
masking, and required there: the domain whose site is shown, likedemo-domain-9.. A main domain (no subdomain), not the domain itself (elsecom invalid_).mask_ domain
outlookobjectoptionalOutlook domains.
ShowHide child fields
domainsobject[]required1 to 200 itemsThe Outlook domains, 1 to 200. Each gets 25 mailboxes.
ShowHide child fields
namestringrequired1 to 253 charactersThe domain name, like
demo-domain-1.(lower-cased for you). No subdomains, nocom www.. Each name only once per order. Withdomain_: a domain you bought from us and haven't used yet (source: purchased GET /domains?status=unused).mailboxesobject[]optional1 to 25 itemsOne entry per mailbox. Google:
mailboxes_entries (default 2); Outlook: exactly 25; SMTP: exactly 4 (elseper_ domain mailbox_). Withcount_ mismatch subdomains: Googlemailboxes_× subdomains, Outlook still 25, SMTP 4 × subdomains; they are spread over the subdomains in order (Google 2 per subdomain withper_ domain ["mail", "team"]: the first 2 onmail., the next 2 onteam.; Outlook 25 over 3: 9 / 8 / 8), and each alias only once per domain. Sendmailboxesorsender(exactly one of the two) on every domain, and use the same one for every domain of a provider.ShowHide child fields
aliasstringrequired1 to 64 charactersThe part before the
@, likejane.. Letters, numbers,doe .,_and-; may not start or end with a symbol; no@or spaces. Unique within the domain (case is ignored).first_namestringrequired1 to 50 charactersSender first name.
last_namestringrequired1 to 50 charactersSender last name.
profile_picture_urlstringoptionalat most 150 charactersAn
httporhttpslink to a profile picture (no base64 data). Ignored for SMTP.
senderobjectoptionalInstead of
mailboxes: one sender name for every mailbox of the domain, and we make the addresses for you (jane.,doe janedoe...). If no addresses can be made from the name:invalid_.name ShowHide child fields
first_namestringrequired1 to 50 charactersSender first name.
last_namestringrequired1 to 50 charactersSender last name.
profile_picture_urlstringoptionalat most 150 charactersAn
httporhttpslink to a profile picture for every mailbox (no base64 data). Ignored for SMTP.
forwardingobjectoptionalWhat visitors of the domain's website see. Left out = no forwarding. With the
maskingadd-on every domain needstype: masking(masking_); without it,target_ required maskingis refused (masking_).add_ on_ required ShowHide child fields
typeenumrequiredredirect: visitors of the domain are sent tourl.masking: the domain shows the site ofmasking_; needs thetarget maskingadd-on.One of:
redirectmaskingurlstringoptional1 to 2048 charactersOnly with
redirect, and required there: where visitors go, likedemo-domain-9.(com/page https://is optional).masking_targetstringoptional1 to 253 charactersOnly with
masking, and required there: the domain whose site is shown, likedemo-domain-9.. A main domain (no subdomain), not the domain itself (elsecom invalid_).mask_ domain
smtpobjectoptionalSMTP domains.
ShowHide child fields
domainsobject[]required1 to 200 itemsThe SMTP domains, 1 to 200. Each gets 4 mailboxes.
ShowHide child fields
namestringrequired1 to 253 charactersThe domain name, like
demo-domain-1.(lower-cased for you). No subdomains, nocom www.. Each name only once per order. Withdomain_: a domain you bought from us and haven't used yet (source: purchased GET /domains?status=unused).mailboxesobject[]optional1 to 25 itemsOne entry per mailbox. Google:
mailboxes_entries (default 2); Outlook: exactly 25; SMTP: exactly 4 (elseper_ domain mailbox_). Withcount_ mismatch subdomains: Googlemailboxes_× subdomains, Outlook still 25, SMTP 4 × subdomains; they are spread over the subdomains in order (Google 2 per subdomain withper_ domain ["mail", "team"]: the first 2 onmail., the next 2 onteam.; Outlook 25 over 3: 9 / 8 / 8), and each alias only once per domain. Sendmailboxesorsender(exactly one of the two) on every domain, and use the same one for every domain of a provider.ShowHide child fields
aliasstringrequired1 to 64 charactersThe part before the
@, likejane.. Letters, numbers,doe .,_and-; may not start or end with a symbol; no@or spaces. Unique within the domain (case is ignored).first_namestringrequired1 to 50 charactersSender first name.
last_namestringrequired1 to 50 charactersSender last name.
profile_picture_urlstringoptionalat most 150 charactersAn
httporhttpslink to a profile picture (no base64 data). Ignored for SMTP.
senderobjectoptionalInstead of
mailboxes: one sender name for every mailbox of the domain, and we make the addresses for you (jane.,doe janedoe...). If no addresses can be made from the name:invalid_.name ShowHide child fields
first_namestringrequired1 to 50 charactersSender first name.
last_namestringrequired1 to 50 charactersSender last name.
profile_picture_urlstringoptionalat most 150 charactersAn
httporhttpslink to a profile picture for every mailbox (no base64 data). Ignored for SMTP.
forwardingobjectoptionalWhat visitors of the domain's website see. Left out = no forwarding. With the
maskingadd-on every domain needstype: masking(masking_); without it,target_ required maskingis refused (masking_).add_ on_ required ShowHide child fields
typeenumrequiredredirect: visitors of the domain are sent tourl.masking: the domain shows the site ofmasking_; needs thetarget maskingadd-on.One of:
redirectmaskingurlstringoptional1 to 2048 charactersOnly with
redirect, and required there: where visitors go, likedemo-domain-9.(com/page https://is optional).masking_targetstringoptional1 to 253 charactersOnly with
masking, and required there: the domain whose site is shown, likedemo-domain-9.. A main domain (no subdomain), not the domain itself (elsecom invalid_).mask_ domain
connectionsobjectoptionalLogins we use to set up your order. Write-only: never returned by any call.
ShowHide child fields
sending_toolobjectoptionalThe sending tool we add the new mailboxes to.
ShowHide child fields
providerenumrequiredYour sending tool. Case, spaces,
-and_are ignored (Email Bison=email_); a name not in the list answersbison invalid_. The full list: Get started › Sending tools and registrars.value One of:
piplsmartleadinstantlyemail_bisonlistkitplusvibelemlistapollosaleshandymailreachsalesforgereplysupersendza_zuclayotherusernamestringrequired1 to 254 charactersLogin for that tool.
passwordstringrequired1 to 500 charactersPassword for that login.
login_urlstringoptional1 to 500 charactersThe login page. If you send it, it can't be empty.
workspacestringoptional1 to 100 charactersThe workspace in the tool to add the mailboxes to.
tagstringoptional1 to 60 charactersTag for the mailboxes in the tool.
{{ID}}becomes the new order's id.api_keystringoptionalat most 500 charactersThe tool's API token, if you have one.
hostingobjectoptionalThe registrar of your
owndomains, so we can set up their DNS. Only withowndomains (elseparameter_).not_ allowed ShowHide child fields
providerenumrequiredWhere your own domains are registered. Case, spaces,
-and_are ignored (Email Bison=email_); a name not in the list answersbison invalid_. The full list: Get started › Sending tools and registrars.value One of:
porkbunnamecheapgodaddyhostgatorbigrockspaceshipdynadotionoscloudflarednsimpleotherusernamestringrequired1 to 254 charactersLogin for that registrar.
passwordstringrequired1 to 500 charactersPassword for that login.
login_urlstringoptional1 to 500 charactersThe login page. If you send it, it can't be empty.
api_keystringoptionalat most 500 charactersRegistrar API token, if you have one.
api_secretstringoptionalat most 500 charactersRegistrar API secret, for registrars that use one.
Response (200)
idstringrequiredThe order (
ord_).. . . added_domainsstring[]requiredThe domains added to the order.
domain_countintegeroptionalDomains on the order now, the new ones included. Left out in the rare case the order could not be read back.
recurring_amountnumberoptionalWhat the order renews for from the next renewal, in US dollars. Left out like
domain_.count amount_chargednumberrequiredWhat the card was charged now, in US dollars: the new domains for the rest of the current period.
Responses
- 201Added. The card was charged and the domains are on the order. Their mailboxes are set up like a new order's.
- 400Invalid input. The body breaks one or more rules, as in
POST /orders(parameter_,missing parameter_,not_ allowed mailbox_,count_ mismatch masking_,target_ required masking_; several answeradd_ on_ required validation_withfailed errors).subdomainscan't be sent here (subdomains_). Nothing is charged.not_ supported - 402Payment failed. The card was declined or needs 3-D Secure (
payment_). Nothing is charged or added.failed - 403Not allowed. The token was made without Can buy (
missing_,scope purchases:write) or withoutorders:write; or the person who made the token is no longer an owner or admin here (role_).not_ allowed - 404Not found. No order with this id in this workspace (
order_). An order of another workspace looks the same.not_ found - 409Not active. The order is already cancelling or has ended (
order_), is still being set up or waiting for a check by our team (not_ active order_), another change to it is running (in_ progress order_: try again in a moment), or its mailboxes are on subdomains (busy subdomain_: not supported in the API yet, contact support).order - 422Can't add. A
purchaseddomain is not one of your unused domains, or anowndomain is already used in ScaledMail or being placed right now (domain_,in_ use paramnames it); this order can't take these domains, for example its Outlook domains have a mailbox count other than 25 (add_: place a new order instead); or the order can't be changed through the API (domains_ not_ offered order_). Nothing is charged.billed_ manually - 429Rate limited. More than 20 purchase calls in a minute with this token (
rate_). Wait for thelimited Retry-Afterseconds. - 500Paid, not saved. The payment result was unclear (
needs_), or the payment went through but the new domains' mailboxes could not be saved (team order_). Our team was told and finishes it. Don't send the domains again.form_ failed server_for an unexpected failure.error - 503Not available. Payments are not available right now (
not_), or the server is busy (available busy, withRetry-After). Nothing changed; try again later.
Like every call, it can also answer 401 (bad key), 400 workspace_, 403 workspace_. See Errors.
