Orders

Create order

Order mailboxes on new, bought or your own domains, in one call. The workspace's saved card is charged right away (a sub-workspace uses its main workspace's card).

POSThttps://api.scaledmail.com/v2/orders
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 before you try again.

Everything is checked before charging: a 4xx answer means nothing was charged.

An order goes provisioning → active. Follow it with GET /orders/:id.

Headers

  • Authorizationstringrequired

    Bearer <your API token>. Tokens start with sm_live_.

  • Workspacestringrequired

    The workspace id to act on (from GET /workspaces or Settings › API tokens). Required on every call except the /workspaces calls; without it: 400 workspace_required.

Body

  • domain_sourceenumrequired

    Where every domain of the order comes from. new: we buy the names in this order (they must be available and not premium). purchased: domains you bought from us and haven't used yet. own: your domains, registered elsewhere (add connections.hosting so we can set up their DNS). One source per order: place one order per source. Pre-warmed domains are bought with POST /prewarmed-orders.

    One of: new purchased own

  • packagestringoptionalat most 100 characters

    To buy a package: its price_id from GET /products (packages). Send the package's domains, or a multiple of them: 2 × the domains = 2 packages (else quantity_mismatch). Leave it out to build your own: you pay for the domains you send (Google per mailbox, Outlook and SMTP per domain). Domains we buy for you (new) are added as one-time lines.

  • domainsobjectrequired

    The domains and their mailboxes, per provider. At least one domain (parameter_missing), at most 500 in total.

    Show child fields
    • googleobjectoptional

      Google Workspace domains.

      Show child fields
      • mailboxes_per_domainintegeroptional1 to 4

        Google mailboxes on every domain, 1 to 4. Default 2. With a package it must be one the package offers (mailboxes_per_domain_not_offered), and a package with a different default needs it sent (parameter_missing).

      • subdomainsstring[]optional2 to 5 items

        Optional: put this provider's mailboxes on subdomains instead of the domain itself. 2 to 5 labels, like ["mail", "team"] = mail.<domain> and team.<domain> for every domain of this provider that doesn't send its own domains[].subdomains (that list must have the same count). A label is letters, digits and - (not first or last), at most 63, no dots, lower-cased for you, each once (else invalid_subdomains). Each subdomain gets mailboxes_per_domain mailboxes, and they are priced per mailbox (3 subdomains × 2 = 6 mailboxes per domain). Works on build-your-own orders (standard prices) and with package set to your own one-domain custom price (a price per Google mailbox, Outlook domain or SMTP domain from GET /products), priced at that price the same way. Any other package (bundles, Classic packages) answers subdomains_not_supported. Left out = mailboxes on the domain itself.

      • domainsobject[]required1 to 300 items

        The Google domains, 1 to 300.

        Show child fields
        • namestringrequired1 to 253 characters

          The domain name, like demo-domain-1.com (lower-cased for you). No subdomains, no www.. Each name only once per order. With domain_source: purchased: a domain you bought from us and haven't used yet (GET /domains?status=unused).

        • mailboxesobject[]optional1 to 25 items

          One entry per mailbox. Google: mailboxes_per_domain entries (default 2); Outlook: exactly 25; SMTP: exactly 4 (else mailbox_count_mismatch). With subdomains: Google mailboxes_per_domain × subdomains, Outlook still 25, SMTP 4 × subdomains; they are spread over the subdomains in order (Google 2 per subdomain with ["mail", "team"]: the first 2 on mail., the next 2 on team.; Outlook 25 over 3: 9 / 8 / 8), and each alias only once per domain. Send mailboxes or sender (exactly one of the two) on every domain, and use the same one for every domain of a provider.

          Show child fields
          • aliasstringrequired1 to 64 characters

            The part before the @, like jane.doe. Letters, numbers, ., _ and -; may not start or end with a symbol; no @ or spaces. Unique within the domain (case is ignored).

          • first_namestringrequired1 to 50 characters

            Sender first name.

          • last_namestringrequired1 to 50 characters

            Sender last name.

          • profile_picture_urlstringoptionalat most 150 characters

            An http or https link to a profile picture (no base64 data). Ignored for SMTP.

        • senderobjectoptional

          Instead 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.

          Show child fields
          • first_namestringrequired1 to 50 characters

            Sender first name.

          • last_namestringrequired1 to 50 characters

            Sender last name.

          • profile_picture_urlstringoptionalat most 150 characters

            An http or https link to a profile picture for every mailbox (no base64 data). Ignored for SMTP.

        • forwardingobjectoptional

          What visitors of the domain's website see. Left out = no forwarding. With the masking add-on every domain needs type: masking (masking_target_required); without it, masking is refused (masking_add_on_required).

          Show child fields
          • typeenumrequired

            redirect: visitors of the domain are sent to url. masking: the domain shows the site of masking_target; needs the masking add-on.

            One of: redirect masking

          • urlstringoptional1 to 2048 characters

            Only with redirect, and required there: where visitors go, like demo-domain-9.com/page (https:// is optional).

          • masking_targetstringoptional1 to 253 characters

            Only with masking, and required there: the domain whose site is shown, like demo-domain-9.com. A main domain (no subdomain), not the domain itself (else invalid_mask_domain).

        • subdomainsstring[]optional2 to 5 items

          Optional, only with the provider's subdomains: THIS domain's own subdomain labels, like ["sales", "hello"] (else it uses the provider's). Exactly as many as the provider's subdomains (that list sets the count and the price), same label rules, each once in this domain (else invalid_subdomains). Without the provider's subdomains it answers invalid_subdomains. Its mailboxes are spread over these labels in order.

    • outlookobjectoptional

      Outlook domains.

      Show child fields
      • subdomainsstring[]optional2 to 5 items

        Optional: put this provider's mailboxes on subdomains instead of the domain itself. 2 to 5 labels, like ["mail", "team"] = mail.<domain> and team.<domain> for every domain of this provider that doesn't send its own domains[].subdomains (that list must have the same count). A label is letters, digits and - (not first or last), at most 63, no dots, lower-cased for you, each once (else invalid_subdomains). A domain keeps its 25 mailboxes and its price; they are split over the subdomains (3 = 9 / 8 / 8). Works on build-your-own orders (standard prices) and with package set to your own one-domain custom price (a price per Google mailbox, Outlook domain or SMTP domain from GET /products), priced at that price the same way. Any other package (bundles, Classic packages) answers subdomains_not_supported. Left out = mailboxes on the domain itself.

      • domainsobject[]required1 to 100 items

        The Outlook domains, 1 to 100. Each gets 25 mailboxes.

        Show child fields
        • namestringrequired1 to 253 characters

          The domain name, like demo-domain-1.com (lower-cased for you). No subdomains, no www.. Each name only once per order. With domain_source: purchased: a domain you bought from us and haven't used yet (GET /domains?status=unused).

        • mailboxesobject[]optional1 to 25 items

          One entry per mailbox. Google: mailboxes_per_domain entries (default 2); Outlook: exactly 25; SMTP: exactly 4 (else mailbox_count_mismatch). With subdomains: Google mailboxes_per_domain × subdomains, Outlook still 25, SMTP 4 × subdomains; they are spread over the subdomains in order (Google 2 per subdomain with ["mail", "team"]: the first 2 on mail., the next 2 on team.; Outlook 25 over 3: 9 / 8 / 8), and each alias only once per domain. Send mailboxes or sender (exactly one of the two) on every domain, and use the same one for every domain of a provider.

          Show child fields
          • aliasstringrequired1 to 64 characters

            The part before the @, like jane.doe. Letters, numbers, ., _ and -; may not start or end with a symbol; no @ or spaces. Unique within the domain (case is ignored).

          • first_namestringrequired1 to 50 characters

            Sender first name.

          • last_namestringrequired1 to 50 characters

            Sender last name.

          • profile_picture_urlstringoptionalat most 150 characters

            An http or https link to a profile picture (no base64 data). Ignored for SMTP.

        • senderobjectoptional

          Instead 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.

          Show child fields
          • first_namestringrequired1 to 50 characters

            Sender first name.

          • last_namestringrequired1 to 50 characters

            Sender last name.

          • profile_picture_urlstringoptionalat most 150 characters

            An http or https link to a profile picture for every mailbox (no base64 data). Ignored for SMTP.

        • forwardingobjectoptional

          What visitors of the domain's website see. Left out = no forwarding. With the masking add-on every domain needs type: masking (masking_target_required); without it, masking is refused (masking_add_on_required).

          Show child fields
          • typeenumrequired

            redirect: visitors of the domain are sent to url. masking: the domain shows the site of masking_target; needs the masking add-on.

            One of: redirect masking

          • urlstringoptional1 to 2048 characters

            Only with redirect, and required there: where visitors go, like demo-domain-9.com/page (https:// is optional).

          • masking_targetstringoptional1 to 253 characters

            Only with masking, and required there: the domain whose site is shown, like demo-domain-9.com. A main domain (no subdomain), not the domain itself (else invalid_mask_domain).

        • subdomainsstring[]optional2 to 5 items

          Optional, only with the provider's subdomains: THIS domain's own subdomain labels, like ["sales", "hello"] (else it uses the provider's). Exactly as many as the provider's subdomains (that list sets the count and the price), same label rules, each once in this domain (else invalid_subdomains). Without the provider's subdomains it answers invalid_subdomains. Its mailboxes are spread over these labels in order.

    • smtpobjectoptional

      SMTP domains.

      Show child fields
      • subdomainsstring[]optional2 to 5 items

        Optional: put this provider's mailboxes on subdomains instead of the domain itself. 2 to 5 labels, like ["mail", "team"] = mail.<domain> and team.<domain> for every domain of this provider that doesn't send its own domains[].subdomains (that list must have the same count). A label is letters, digits and - (not first or last), at most 63, no dots, lower-cased for you, each once (else invalid_subdomains). Every subdomain is like its own SMTP domain: 4 mailboxes and one SMTP domain price each. Works on build-your-own orders (standard prices) and with package set to your own one-domain custom price (a price per Google mailbox, Outlook domain or SMTP domain from GET /products), priced at that price the same way. Any other package (bundles, Classic packages) answers subdomains_not_supported. Left out = mailboxes on the domain itself.

      • domainsobject[]required1 to 100 items

        The SMTP domains, 1 to 100. Each gets 4 mailboxes.

        Show child fields
        • namestringrequired1 to 253 characters

          The domain name, like demo-domain-1.com (lower-cased for you). No subdomains, no www.. Each name only once per order. With domain_source: purchased: a domain you bought from us and haven't used yet (GET /domains?status=unused).

        • mailboxesobject[]optional1 to 25 items

          One entry per mailbox. Google: mailboxes_per_domain entries (default 2); Outlook: exactly 25; SMTP: exactly 4 (else mailbox_count_mismatch). With subdomains: Google mailboxes_per_domain × subdomains, Outlook still 25, SMTP 4 × subdomains; they are spread over the subdomains in order (Google 2 per subdomain with ["mail", "team"]: the first 2 on mail., the next 2 on team.; Outlook 25 over 3: 9 / 8 / 8), and each alias only once per domain. Send mailboxes or sender (exactly one of the two) on every domain, and use the same one for every domain of a provider.

          Show child fields
          • aliasstringrequired1 to 64 characters

            The part before the @, like jane.doe. Letters, numbers, ., _ and -; may not start or end with a symbol; no @ or spaces. Unique within the domain (case is ignored).

          • first_namestringrequired1 to 50 characters

            Sender first name.

          • last_namestringrequired1 to 50 characters

            Sender last name.

          • profile_picture_urlstringoptionalat most 150 characters

            An http or https link to a profile picture (no base64 data). Ignored for SMTP.

        • senderobjectoptional

          Instead 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.

          Show child fields
          • first_namestringrequired1 to 50 characters

            Sender first name.

          • last_namestringrequired1 to 50 characters

            Sender last name.

          • profile_picture_urlstringoptionalat most 150 characters

            An http or https link to a profile picture for every mailbox (no base64 data). Ignored for SMTP.

        • forwardingobjectoptional

          What visitors of the domain's website see. Left out = no forwarding. With the masking add-on every domain needs type: masking (masking_target_required); without it, masking is refused (masking_add_on_required).

          Show child fields
          • typeenumrequired

            redirect: visitors of the domain are sent to url. masking: the domain shows the site of masking_target; needs the masking add-on.

            One of: redirect masking

          • urlstringoptional1 to 2048 characters

            Only with redirect, and required there: where visitors go, like demo-domain-9.com/page (https:// is optional).

          • masking_targetstringoptional1 to 253 characters

            Only with masking, and required there: the domain whose site is shown, like demo-domain-9.com. A main domain (no subdomain), not the domain itself (else invalid_mask_domain).

        • subdomainsstring[]optional2 to 5 items

          Optional, only with the provider's subdomains: THIS domain's own subdomain labels, like ["sales", "hello"] (else it uses the provider's). Exactly as many as the provider's subdomains (that list sets the count and the price), same label rules, each once in this domain (else invalid_subdomains). Without the provider's subdomains it answers invalid_subdomains. Its mailboxes are spread over these labels in order.

  • add_onsenum[]optionalat most 2 items

    masking: Domain Masking for every domain (each needs forwarding.type: masking). reporting: deliverability reports for every provider in the order. Each once (duplicate_add_ons). A combination the products don't offer answers product_unavailable.

  • interval_months1 | 3 | 6 | 12optional

    Months one renewal covers: 1, 3, 6 or 12. Default 1. 3, 6 and 12 months take no promotion code. Packages are monthly only (interval_not_offered); a period the products don't offer answers product_unavailable.

  • couponstringoptional1 to 64 characters

    A promotion code: letters, numbers, _ and -, at most 64. Unknown or ended: coupon_not_found. Refused (coupon_not_allowed) with 3, 6 or 12-month billing (interval_months above 1), on orders with new domains and with your custom price (if you have one); allowed on monthly orders (plan builder or package) on own or purchased domains.

  • connectionsobjectoptional

    Logins we use to set up your order. Write-only: never returned by any call.

    Show child fields
    • sending_toolobjectoptional

      The sending tool we add the new mailboxes to.

      Show child fields
      • providerenumrequired

        Your sending tool. Case, spaces, - and _ are ignored (Email Bison = email_bison); a name not in the list answers invalid_value. The full list: Get started › Sending tools and registrars.

        One of: pipl smartlead instantly email_bison listkit plusvibe lemlist apollo saleshandy mailreach salesforge reply supersend za_zu clay other

      • usernamestringrequired1 to 254 characters

        Login for that tool.

      • passwordstringrequired1 to 500 characters

        Password for that login.

      • login_urlstringoptional1 to 500 characters

        The login page. If you send it, it can't be empty.

      • workspacestringoptional1 to 100 characters

        The workspace in the tool to add the mailboxes to.

      • tagstringoptional1 to 60 characters

        Tag for the mailboxes in the tool. {{ID}} becomes the new order's id.

      • api_keystringoptionalat most 500 characters

        The tool's API token, if you have one.

    • hostingobjectoptional

      The registrar of your own domains, so we can set up their DNS. Only with own domains (else parameter_not_allowed).

      Show child fields
      • providerenumrequired

        Where your own domains are registered. Case, spaces, - and _ are ignored (Email Bison = email_bison); a name not in the list answers invalid_value. The full list: Get started › Sending tools and registrars.

        One of: porkbun namecheap godaddy hostgator bigrock spaceship dynadot ionos cloudflare dnsimple other

      • usernamestringrequired1 to 254 characters

        Login for that registrar.

      • passwordstringrequired1 to 500 characters

        Password for that login.

      • login_urlstringoptional1 to 500 characters

        The login page. If you send it, it can't be empty.

      • api_keystringoptionalat most 500 characters

        Registrar API token, if you have one.

      • api_secretstringoptionalat most 500 characters

        Registrar API secret, for registrars that use one.

  • tagstringoptionalat most 60 characters

    Your label for the order, shown in the app. Spaces at the ends are removed.

Response (200)

  • idstringrequired

    The new order (ord_...).

  • statusenumrequired

    provisioning: paid; domains and mailboxes are being set up.

    One of: provisioning

  • tagstringoptional

    Your label for the order. Only when you sent one.

  • domain_countintegerrequired

    Domains on the order, all providers.

  • recurring_amountnumberrequired

    What the order renews for each period, in US dollars.

  • amount_chargednumberrequired

    What this call charged, in US dollars: the first billing period plus one-time costs such as domain registration.

Responses

  • 201Created. The card was charged and the order is placed.
  • 400Invalid input. The body breaks one or more rules. One problem answers its own code and param (e.g. parameter_missing, parameter_not_allowed, mailbox_count_mismatch, invalid_subdomains (not 2 to 5 labels, a bad label or one twice, a domain's own subdomains with another count or without the provider's), subdomains_not_supported (subdomains with a package), quantity_mismatch, interval_not_offered, mailboxes_per_domain_not_offered, duplicate_add_ons, masking_target_required, masking_add_on_required, too_many_domains, product_unavailable for an unknown package); several answer validation_failed with every problem in errors. Domain-name, alias, duplicate-name and login problems answer validation_failed with a message; invalid_name, invalid_mask_domain and invalid_order come from building the order form. Not valid JSON or over 5 MB: invalid_request. Nothing is charged.
  • 400Coupon refused. The code does not exist or has ended (coupon_not_found), or it can't be used here (coupon_not_allowed): 3, 6 or 12-month billing, an order with new domains, or your custom price. Nothing is charged.
  • 402Payment failed. The bank declined the card (card_declined). Other codes: no_payment_method (no saved card; add one in the app under Billing), authentication_required (the card needs 3-D Secure; pay once in the app), payment_failed. Nothing is charged.
  • 403Not allowed. The token was made without Can buy (missing_scope); the person who made the token may not place orders here (role_not_allowed); or the workspace is billed by invoice (not_available_for_account: contact support).
  • 422Can't be bought. A new name is taken or premium (domain_unavailable); a purchased or own domain is already used in ScaledMail or being placed in another order right now (domain_in_use); or the products, add-ons and period can't be bought together (product_unavailable). Nothing is charged.
  • 429Rate limited. More than 20 purchase calls in a minute with this token (rate_limited). Wait for the Retry-After seconds. Also rate_limited when too many orders were started in a short time.
  • 500Paid, not saved. The payment went through, or its result was unclear, but the order could not be read back (needs_team), or its domains and mailboxes could not be saved (order_form_failed, names the order). Our team was told and finishes or refunds the order. Don't send the order again. server_error for an unexpected failure.
  • 503Not available. Payments are not available right now (not_available), or the server is busy (busy, with Retry-After). Nothing changed; try again later.

Like every call, it can also answer 401 (bad key), 400 workspace_required, 403 workspace_not_allowed. See Errors.