Change requests

Create change request

Ask for changes on a domain in one request: a new domain, its redirect or masking target, and sender names, any of them together. Free.

POSThttps://api.scaledmail.com/v2/change-requests
Rate limit
Write: 60 calls per minute per token

Send at least one change. A new domain must already be yours: bought with POST /domain-purchases or your own. A domain has one open request at a time (one request can carry several changes): while it is open, a new one answers 409 change_request_open, so a retry can't make a second request. A domain whose order is being cancelled can't be changed (409 domain_cancelling).

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

  • domainstringrequired1 to 253 characters

    The domain to change, by name. Case is ignored.

  • replace_domainobjectoptional

    Put another domain in this one's place on its order.

    Show child fields
    • new_domainstringrequired1 to 253 characters

      The domain that takes over, like demo-domain-4.com. A main domain only (no subdomain; else 400 invalid_domain), not the domain itself. It must not already be in use at ScaledMail.

    • sourceenumrequired

      purchased = a domain you already bought from us that is not on an order (GET /domains?status=unused, available_for_order: true); buy one first with POST /domain-purchases. own = a domain you registered elsewhere.

      One of: purchased own

    • hostingobjectoptional

      Only with source: own (else 400 validation_failed), and optional there: the registrar login, so our team can set up the DNS. Saved with your workspace's registrar logins only once the request itself is saved (a refused request saves nothing); never returned. If the token's creator may not save registrar logins, the request is still made and our team asks you for the login. A login that isn't valid for that registrar answers 400 invalid_hosting.

      Show child fields
      • providerenumrequired

        Where the domain is registered: the same list and name rule as in POST /orders (Get started › Sending tools and registrars).

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

      • usernamestringrequired1 to 254 characters

        Login of that account.

      • passwordstringrequired1 to 500 characters

        Password of that account.

      • login_urlstringoptional1 to 500 characters

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

      • api_keystringoptionalat most 500 characters

        Its API token, if you have one.

      • api_secretstringoptionalat most 500 characters

        The API secret paired with the token.

  • redirectobjectoptional

    Set, change or remove the redirect. Only for a domain with a plain redirect or none (forwarding.type redirect or none). Not together with masking.

    Show child fields
    • urlstring | nullrequired

      The new address, like example.com/page (https:// is optional; at most 253 characters once cleaned, else 400 invalid_url). null or "" removes the redirect.

  • maskingobjectoptional

    Change the site a masked domain shows. Only for a domain that uses Domain Masking (forwarding.type: masking). Not together with redirect.

    Show child fields
    • masking_targetstringrequired1 to 253 characters

      The domain whose site is shown, like example.com. A main domain (no subdomain), not the masked domain itself (else 400 invalid_domain). Saved in lower case.

  • sender_nameobjectoptional

    New sender names (and addresses) for mailboxes of this domain.

    Show child fields
    • mailboxesobject[]required1 to 100 items

      The mailboxes of this domain to change, each with its new name. Mailboxes you leave out keep their names.

      Show child fields
      • mailboxstringrequired1 to 320 characters

        The mailbox address, like jane@demo-domain-1.com. Each mailbox once (else 400 duplicate_mailbox).

      • first_namestringrequired1 to 50 characters

        New first name, 1 to 50 characters. Spaces at the ends are removed.

      • last_namestringrequired1 to 50 characters

        New last name, 1 to 50 characters. Spaces at the ends are removed.

      • aliasstringoptional1 to 64 characters

        New part before the @, like jane.doe: letters, numbers, ., _ and -, not starting or ending with a symbol (else 400 invalid_alias). Saved in lower case. Left out = the address stays.

Response (200)

  • idstringrequired

    The change request id: chg_ and 32 hex characters.

  • changesenum[]required

    What the request changes, one or more of: replace_domain = another domain takes this one's place on its order; redirect = set, change or remove where visitors are sent; masking = change the site a masked domain shows; sender_name = new sender names (and if you like new addresses) on its mailboxes.

  • status"pending"required

    A new request is saved and not started yet.

  • domainstringrequired

    The domain the request is for (its name when the request was made).

  • replace_domainobjectoptional

    Only when changes has replace_domain.

    Show child fields
    • new_domainstringrequired

      The domain that takes over.

    • sourceenumrequired

      purchased = bought from us, own = registered by you elsewhere.

      One of: purchased own

  • redirectobjectoptional

    Only when changes has redirect.

    Show child fields
    • urlstringoptional

      The new address, saved without https://, without a trailing / and in lower case. Left out = the redirect is removed.

  • maskingobjectoptional

    Only when changes has masking.

    Show child fields
    • masking_targetstringrequired

      The domain whose site the masked domain will show.

  • sender_nameobjectoptional

    Only when changes has sender_name.

    Show child fields
    • mailboxesobject[]required

      Each mailbox that changes, by address.

      Show child fields
      • emailstringrequired

        Its address when the request was made.

      • first_namestringrequired

        New first name.

      • last_namestringrequired

        New last name.

      • new_emailstringoptional

        New address. Only when the address changes.

  • created_atstringrequired

    When the request was made, as a date: YYYY-MM-DD (UTC).

Responses

  • 201Created. The request is saved, normally with status: pending.
  • 400Invalid input. No change is sent (parameter_missing), or redirect and masking are sent together (parameter_not_allowed). A field is missing, too long or of the wrong type (validation_failed; several problems at once list each in errors). new_domain / masking_target is not a main domain (invalid_domain), redirect.url is not an address (invalid_url), an alias is not valid (invalid_alias), the registrar login is not valid (invalid_hosting), a mailbox is listed twice (duplicate_mailbox), or the body is not JSON or too large (invalid_request).
  • 403Not allowed. The token does not have the change_requests:write scope (missing_scope), or Workspace names a workspace the token does not cover (workspace_not_allowed). Or the token's creator may not request changes in this workspace (role_not_allowed).
  • 404Domain not found. No such domain in this workspace (a domain of another workspace looks the same), or it is being cancelled.
  • 409Request open. The domain already has an open change request, of any kind (change_request_open); its order is being cancelled (domain_cancelling); or a new address is already used by another mailbox of the domain (alias_in_use).
  • 422Can't change. The new domain is not one of your unused bought domains (domain_not_available) or is already used at ScaledMail (domain_in_use); redirect was sent for a masked domain or masking for one without masking (forwarding_type_mismatch); a mailbox is not on this domain (mailbox_not_on_domain); or nothing would change (no_change: the same redirect, masking target or names, or new_domain is the domain itself).
  • 429Rate limited. More than 60 write calls in a minute with this token, or too many change requests in a short time for this workspace (same code rate_limited). Wait for the Retry-After seconds.

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