Domain changes
Replace a domain
Ask for a domain to be replaced by another one. When our team has finished, the new domain takes over the old one's place on your order: its mailboxes (with the new domain in their addresses) and its redirect or masking.
https://server.scaledmail.com/api/v1/swap-domain/:old_domain- Token access
- Read and write
- Rate limit
- 40 write calls per minute per token
This call does not change anything by itself. It opens a change request and answers as soon as the request is saved. You can follow the request, or cancel it while it is still Pending, under Infrastructure › Domain updates in the app. There is no API call to read or cancel a request.
Our team carries out a domain change by hand (DNS, new mailboxes at Google or Microsoft). When it is done, GET /domains shows the new domain. A domain bought from us that you swap out goes back to your unused purchased domains; a domain of your own is released.
Only one open request of each kind per domain: a domain change, a sender name change, and a redirect or masking change (these two share one slot). Another request of the same kind answers 409. Changes are free.
Path parameters
old_domainstringrequiredat most 253 charactersA domain of this workspace, like
demo-domain-1.. Case is ignored. Domains that are being cancelled (alone or with their whole order), expired or released are not found, and neither are domains you only point to us for masking.com
Headers
AuthorizationstringrequiredBearer <your API token>. The token needs Read and write access.
Query parameters
organization_idstringrequiredYour workspace id (
org_). Must be a workspace this token was made for.. . . providerenumrequiredWhere the new domain comes from.
scaledmail: a domain you bought from us that is not in use yet (seeGET /purchased-domains?available=true).other: a domain you own at another registrar. Case is ignored.One of:
scaledmailother
Body
new_domainstringrequiredat most 253 charactersThe domain that takes over, like
demo-domain-2.. A main domain only (no subdomain likecom mail.;demo-domain-2. com demo-domain-2.is fine). It must not already be in use at ScaledMail.co. uk hostingobjectoptionalOnly with
provider=other, and optional there: the login of the registrar that holds the new domain, so our team can set up its DNS. It is saved with your workspace's registrar logins before the request is opened, so it stays saved even if the request is then refused. Not allowed withprovider=scaledmail.ShowHide child fields
providerenumrequiredWhere the new domain is registered. Case is ignored.
One of:
PorkbunNamecheapGodaddyHostGatorBigrockSpaceshipDynadotIonosCloudflareDnSimpleScaledmailOtherusernamestringrequired1 to 254 charactersLogin of that registrar account.
passwordstringrequired1 to 500 charactersPassword of that registrar account.
linkstringoptional1 to 500 charactersLogin page of the registrar. Must not be empty when sent.
api_keystringoptionalat most 500 charactersThe registrar's API key, if you have one.
api_secretstringoptionalat most 500 charactersThe API secret some registrars pair with the key.
Response (200)
message"Domain Swap Requested"requiredDomain Swap Requested. The request is open; nothing has changed yet.
Responses
- 200OK. The request is open. Our team will carry it out.
- 400No provider. The
providerquery parameter is missing. The text also namesbuy, butbuyis not accepted here: a value other thanscaledmailorotheranswersInvalid provider..Must be 'scaledmail' or 'other' - 400Invalid hosting.
hostingis sent withprovider=scaledmail(hosting_), or it lacksnot_ allowed provider,usernameorpassword, has an emptylink, a field that is too long, anapi_/key api_that is not text, or a registrar not in the list (secret invalid_).hosting - 400Invalid domain.
new_ordomain old_is not a domain name, ordomain new_is a subdomain.domain - 400New domain not free. With
provider=scaledmail: the new domain is not one of your unused purchased domains, or another request already uses it. Withprovider=otherthe same text comes with status409when the domain is already in use at ScaledMail. - 404Domain not found. No such domain in this workspace (a domain of another workspace looks the same), or it is being cancelled.
- 409Request already open. This domain already has an open Domain Name request. Wait until our team or our system has finished it, or cancel it in the app while it is still Pending.
- 403Read-only token. The token has Read access only.
- 429Too many requests. More than 30 change requests in a minute by the person who made the token (the app's requests count too), or more than 40 write calls in a minute on this token (then the body is the rate-limit error with
error: rate_and alimited Retry-Afterheader). - 500Server error. Something went wrong on our side. No request was opened; try again.
