v1 is deprecated. Please move to API v2 (recommended). v1 keeps working until March 31, 2027, then it stops. See Moving from v1.

Orders

Create order

Buy a mailbox package and send its domains and mailboxes in one call. Charged to the workspace's saved card; the order starts as soon as the payment goes through.

POSThttps://server.scaledmail.com/api/v1/create-order/:price_id
Token access
Read and write
Rate limit
15 buy calls per minute per token

This call charges your saved card right away. Always send an Idempotency-Key: if your call times out and you retry without one, you pay twice.

Everything in the body is checked before your card is charged; a 400 means nothing was charged. If the payment went through but the domains and mailboxes could not be saved, you get 500 order_form_failed with details.order_id: the order exists, our team is told, and you can finish it in the app. Don't send it again with a new key.

Get the price_id from GET /packages (id). For any mix of domain counts at standard prices, use POST /create-custom-order instead.

If your account is billed by invoice instead of by card, the domains are added to your existing order and billed on your next invoice (nothing is charged now). order_id is then that order's id. Send only the price's own provider, 1 to 200 domains; quantity (if you send it) must equal the number of domains. Coupons, domains_masking, reporting and provider=scaledmail are refused (400). When the order can't take domains right now you get 409 (order_form_pending, cancelling, contact_support, payments_unavailable, or busy while another change runs); when billing refuses the change, 402 payment_failed (nothing was added). If the domains were added but their mailboxes could not be saved, you get 500 order_form_failed with details.order_id and details.batch_id: finish them in the app.

Path parameters

  • price_idstringrequired

    The package to buy: its id from GET /packages (price_...).

Headers

  • Authorizationstringrequired

    Bearer <your API token>. The token needs Read and write access, and the person who made it must be an owner or admin of the workspace.

  • Idempotency-Keystringoptionalat most 255 characters

    Any unique text per order (a UUID works), at most 255 characters (longer answers 400 invalid_idempotency_key). A key counts per token and per endpoint (for POST /create-order, per price_id too). Send the same key again and you get the first result back, with no second charge. Without a key every call is a new order and a new charge.

Query parameters

  • organization_idstringrequired

    Your workspace id (org_...). Must be a workspace this token was made for.

  • providerenumrequired

    Where the domains come from (case is ignored). scaledmail: domains you already bought from us and haven't used yet (GET /purchased-domains?available=true). other: your own domains, registered somewhere else. buy: we buy the listed domains for you in the same payment; every name must be available.

    One of: scaledmail other buy

  • couponstringoptionalat most 64 characters

    A promotion code. Letters, numbers, _ and - only. A code we don't know, or one with other characters, answers 400 coupon_not_found. Not allowed on prices that don't take discounts, or when you buy domains in the same order (provider=buy): that answers 400 Coupons are not allowed for this plan.

  • domains_maskingenumoptional

    Send exactly true to add Domain Masking. Every domain then needs a mask_domain and may not have a redirect. Any other value means off.

    One of: true false

  • reportingenumoptional

    Send exactly true to add the Reporting add-on for every provider in the order. A package that doesn't offer it answers 400 invalid_order.

    One of: true false

Body

  • providersobjectrequired

    The domains and mailboxes, per provider. At least one provider. At most 500 domains in total.

    Show child fields
    • googleobjectoptional

      Google Workspace domains.

      Show child fields
      • mailboxes_per_domainintegeroptional1 to 4

        Google mailboxes per domain. Leave it out to get the default: 2, or the package's own count. Which values work depends on what you buy. POST /create-custom-order and the standard per-mailbox Google price: 1, 2, 3 or 4. A custom per-mailbox Google package (it lists mailbox.options in GET /packages): 1, 2 or 3. Any other package: leave it out (a standard package refuses every value, another custom package takes only its own count); a value it doesn't take answers 400 mailboxes_per_domain is not supported for this package. Billed by invoice: the count your order already has for Google (anything else answers 400 mailboxes_per_domain must be 2 (your subscription's)), or 1, 2, 3 or 4 when it has no Google yet. Anything but 1, 2, 3 or 4 answers 400 mailboxes_per_domain for google must be 1, 2, 3, or 4.

      • domainsobject[]required1 to 300 items

        The Google domains.

        Show child fields
        • domainstringrequiredat most 253 characters

          The domain name, like demo-domain-1.com. No subdomains (mail.site.com) and no www.. Each name may appear only once in the whole order (case is ignored).

        • first_namestringoptionalat most 50 characters

          Sender first name. With last_name, the mailbox addresses are made for you (jane.doe, janedoe ...). Send either first_name + last_name or aliases, and use the same choice for every domain of this provider.

        • last_namestringoptionalat most 50 characters

          Sender last name. Goes with first_name.

        • profile_picturestringoptionalat most 150 characters

          With first_name + last_name: link (http or https) to a profile picture for every mailbox of the domain. No base64 data. Ignored for SMTP.

        • aliasesobject[]optional1 to 4 items

          The mailboxes of this domain, one entry each. Exactly mailboxes_per_domain entries (or the package's own count when you leave that out).

          Show child fields
          • first_namestringrequired1 to 50 characters

            Sender first name.

          • last_namestringrequired1 to 50 characters

            Sender last name.

          • aliasstringrequired1 to 64 characters

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

          • profile_picturestringoptionalat most 150 characters

            Link (http or https) to a profile picture. No base64 data. Ignored for SMTP.

        • redirectstringoptionalat least 1 characters

          A website visitors of this domain are sent to, like demo-domain-9.com or demo-domain-9.com/page (http:// or https:// is optional). At most 253 characters without the http:// / https://. If you send it, it can't be empty. Not together with mask_domain, and not when domains_masking=true.

        • mask_domainstringoptional1 to 253 characters

          Only with domains_masking=true, and then required: the website this domain is masked to. Must be a main domain (not a subdomain) and not the domain itself.

    • outlookobjectoptional

      Outlook domains.

      Show child fields
      • domainsobject[]required1 to 100 items

        The Outlook domains. Each one gets 25 mailboxes.

        Show child fields
        • domainstringrequiredat most 253 characters

          The domain name, like demo-domain-1.com. No subdomains (mail.site.com) and no www.. Each name may appear only once in the whole order (case is ignored).

        • first_namestringoptionalat most 50 characters

          Sender first name. With last_name, the mailbox addresses are made for you (jane.doe, janedoe ...). Send either first_name + last_name or aliases, and use the same choice for every domain of this provider.

        • last_namestringoptionalat most 50 characters

          Sender last name. Goes with first_name.

        • profile_picturestringoptionalat most 150 characters

          With first_name + last_name: link (http or https) to a profile picture for every mailbox of the domain. No base64 data. Ignored for SMTP.

        • aliasesobject[]optional25 to 25 items

          The mailboxes of this domain, one entry each. Exactly 25 entries.

          Show child fields
          • first_namestringrequired1 to 50 characters

            Sender first name.

          • last_namestringrequired1 to 50 characters

            Sender last name.

          • aliasstringrequired1 to 64 characters

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

          • profile_picturestringoptionalat most 150 characters

            Link (http or https) to a profile picture. No base64 data. Ignored for SMTP.

        • redirectstringoptionalat least 1 characters

          A website visitors of this domain are sent to, like demo-domain-9.com or demo-domain-9.com/page (http:// or https:// is optional). At most 253 characters without the http:// / https://. If you send it, it can't be empty. Not together with mask_domain, and not when domains_masking=true.

        • mask_domainstringoptional1 to 253 characters

          Only with domains_masking=true, and then required: the website this domain is masked to. Must be a main domain (not a subdomain) and not the domain itself.

    • smtpobjectoptional

      SMTP domains.

      Show child fields
      • domainsobject[]required1 to 100 items

        The SMTP domains. Each one gets 4 mailboxes.

        Show child fields
        • domainstringrequiredat most 253 characters

          The domain name, like demo-domain-1.com. No subdomains (mail.site.com) and no www.. Each name may appear only once in the whole order (case is ignored).

        • first_namestringoptionalat most 50 characters

          Sender first name. With last_name, the mailbox addresses are made for you (jane.doe, janedoe ...). Send either first_name + last_name or aliases, and use the same choice for every domain of this provider.

        • last_namestringoptionalat most 50 characters

          Sender last name. Goes with first_name.

        • profile_picturestringoptionalat most 150 characters

          With first_name + last_name: link (http or https) to a profile picture for every mailbox of the domain. No base64 data. Ignored for SMTP.

        • aliasesobject[]optional4 to 4 items

          The mailboxes of this domain, one entry each. Exactly 4 entries.

          Show child fields
          • first_namestringrequired1 to 50 characters

            Sender first name.

          • last_namestringrequired1 to 50 characters

            Sender last name.

          • aliasstringrequired1 to 64 characters

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

          • profile_picturestringoptionalat most 150 characters

            Link (http or https) to a profile picture. No base64 data. Ignored for SMTP.

        • redirectstringoptionalat least 1 characters

          A website visitors of this domain are sent to, like demo-domain-9.com or demo-domain-9.com/page (http:// or https:// is optional). At most 253 characters without the http:// / https://. If you send it, it can't be empty. Not together with mask_domain, and not when domains_masking=true.

        • mask_domainstringoptional1 to 253 characters

          Only with domains_masking=true, and then required: the website this domain is masked to. Must be a main domain (not a subdomain) and not the domain itself.

  • tagstringoptionalat most 60 characters

    Your own label for the order, at most 60 characters after spaces at the ends are removed.

  • hostingobjectoptional

    Login of the registrar that holds your own domains, so we can set up their DNS. Only with provider=other (refused with scaledmail or buy). Optional.

    Show child fields
    • providerenumrequired

      Where the domains are registered (case, spaces, - and _ are ignored: go daddy = Godaddy).

      One of: Porkbun Namecheap Godaddy HostGator Bigrock Spaceship Dynadot Ionos Cloudflare DnSimple Scaledmail Other

    • usernamestringrequired1 to 254 characters

      Login for that registrar.

    • passwordstringrequired1 to 500 characters

      Password for that login.

    • linkstringoptional1 to 500 characters

      Login page, a web address like https://demo-domain-9.com/login. If you send it, it can't be empty.

    • api_keystringoptionalat most 500 characters

      Registrar API key, if you have one.

    • api_secretstringoptionalat most 500 characters

      Registrar API secret (Porkbun, Spaceship, Dynadot, GoDaddy).

  • sequencerobjectoptional

    Login of the sending tool we add the mailboxes to. Optional.

    Show child fields
    • providerenumrequired

      Your sending tool (case, spaces, - and _ are ignored: emailbison = Email Bison).

      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.

    • linkstringoptional1 to 500 characters

      Login page, a web address like https://demo-domain-9.com/login. If you send it, it can't be empty.

    • workspacestringoptional1 to 100 characters

      Workspace in the tool to add the mailboxes to. If you send it, it can't be empty.

    • tagstringoptional1 to 60 characters

      Tag for the mailboxes in the tool. Send {{ID}} to use the new order id. If you send it, it can't be empty.

    • api_keystringoptionalat most 500 characters

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

  • quantityintegeroptional1 to 1000default 1

    How many of this package (0 counts as 1). The domains you send must match: per provider, the package's domains × quantity. For a per-domain or per-mailbox price, this is the number of domains.

Response (200)

  • messagestringrequired

    Order created successfully.

  • order_idstringrequired

    The new order id (sub_...). Use it with GET /orders/:uuid.

  • domains_purchasedstring[]optional

    Only with provider=buy: the domains bought, as you sent them.

Responses

  • 200OK. The card was charged and the order is placed.
  • 400Invalid input. The body breaks a rule, or the domain counts don't match the package × quantity (first the total, then each provider: Expected 10 Google domains ...; Outlook is called Microsoft there). error says what, code is mostly invalid_request (also invalid_quantity, invalid_idempotency_key, tag_too_long, invalid_name, invalid_mask_domain, invalid_order, not_available_for_account, and order_in_progress when another call is placing one of the same domains right now). A bad or unknown coupon answers error: "coupon_not_found". With provider=other, a domain that is already in ScaledMail answers Existing domains found: .... Nothing is charged.
  • 400Not available. With provider=buy: one or more names can't be bought. Nothing is charged.
  • 400No saved card. The workspace has no saved card. Add one in the app under Billing. Nothing is charged.
  • 403No access. price_id is not a package this workspace can buy.
  • 403Not allowed. The person who made the token may not place orders in this workspace (not an owner or admin). A Read token gets 403 missing_scope.
  • 402Card declined. The bank refused the payment. Nothing is charged. Retry with a new Idempotency-Key (the same key answers 402 payment_failed). card_requires_action (also 402): the bank wants an extra check that can't be done through the API.
  • 409In progress. A call with the same Idempotency-Key is still running. Wait a moment and send it again.
  • 500Charged, not finished. The payment may have gone through but the order could not be finished. Our team is told and finishes or refunds it. Don't retry with a new Idempotency-Key. (500 order_form_failed, with details.order_id: the order exists but its domains and mailboxes were not saved; finish them in the app.)
  • 429Busy. Too many orders are being placed at once. Nothing is charged. Wait for the Retry-After seconds and send it again with the same Idempotency-Key.
  • 429Too many orders. The person who made the token started more than 30 orders in the last hour. Nothing is charged. Try again later.
  • 429Rate limited. More than 15 buy calls in a minute. Wait for the Retry-After seconds.
  • 501Not available. Paying with a saved card (or buying domains) is switched off right now. Nothing is charged.