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.

POSThttps://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_source: purchased.

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

  • idstringrequired

    The order id (ord_...).

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 the new domains come from. purchased: domains you bought from us and haven't used yet (GET /domains?status=unused; buy new ones first with POST /domain-purchases). own: your domains, registered elsewhere (add connections.hosting so we can set up their DNS). One source per call.

    One of: purchased own

  • domainsobjectrequired

    The new domains and their mailboxes, per provider, as in POST /orders. At least one domain (parameter_missing). When the order has Domain Masking, every new domain needs forwarding.type: masking; without it, masking is refused.

    Show child fields
    • googleobjectoptional

      Google Workspace domains.

      Show child fields
      • mailboxes_per_domainintegeroptional2 to 3

        Google 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 items

        The Google domains, 1 to 200.

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

    • outlookobjectoptional

      Outlook domains.

      Show child fields
      • domainsobject[]required1 to 200 items

        The Outlook domains, 1 to 200. 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).

    • smtpobjectoptional

      SMTP domains.

      Show child fields
      • domainsobject[]required1 to 200 items

        The SMTP domains, 1 to 200. 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).

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

Response (200)

  • idstringrequired

    The order (ord_...).

  • added_domainsstring[]required

    The domains added to the order.

  • domain_countintegeroptional

    Domains on the order now, the new ones included. Left out in the rare case the order could not be read back.

  • recurring_amountnumberoptional

    What the order renews for from the next renewal, in US dollars. Left out like domain_count.

  • amount_chargednumberrequired

    What 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_add_on_required; several answer validation_failed with errors). subdomains can't be sent here (subdomains_not_supported). Nothing is charged.
  • 402Payment failed. The card was declined or needs 3-D Secure (payment_failed). Nothing is charged or added.
  • 403Not allowed. The token was made without Can buy (missing_scope, purchases:write) or without orders: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_not_found). An order of another workspace looks the same.
  • 409Not active. The order is already cancelling or has ended (order_not_active), is still being set up or waiting for a check by our team (order_in_progress), another change to it is running (order_busy: try again in a moment), or its mailboxes are on subdomains (subdomain_order: not supported in the API yet, contact support).
  • 422Can't add. A purchased domain is not one of your unused domains, or an own domain is already used in ScaledMail or being placed right now (domain_in_use, param names it); this order can't take these domains, for example its Outlook domains have a mailbox count other than 25 (add_domains_not_offered: place a new order instead); or the order can't be changed through the API (order_billed_manually). Nothing is charged.
  • 429Rate limited. More than 20 purchase calls in a minute with this token (rate_limited). Wait for the Retry-After seconds.
  • 500Paid, not saved. The payment result was unclear (needs_team), or the payment went through but the new domains' mailboxes could not be saved (order_form_failed). Our team was told and finishes it. Don't send the domains 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.