Domain changes
Update sender name
Ask for new sender names on all mailboxes of a domain, and if you like new addresses made from those names. Cancelled mailboxes are left out.
https://server.scaledmail.com/api/v1/swap-sender-name/: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 changes the names (and addresses) at Google or Microsoft by hand. When it is done, GET /mailboxes/:domain shows the new names and addresses.
In name_ mode, accents are made plain and other characters dropped (José O'Neil gives jose.). If two names would give the same address, or a name can't give enough addresses for its block, the call is refused: try other names or fewer of them.
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.. . . modeenumrequiredname_: change the sender names, keep every address.only name_: change the names and give each mailbox a new address made from its new name (and_ alias jane.,doe janedoe,jane_,doe j....).doe One of:
name_onlyname_and_alias
Body
sender_namesobject[]required1 to 100 itemsThe new senders, 1 to 100, and never more than the domain has mailboxes. The mailboxes (oldest first) are split into blocks of mailboxes ÷ names, rounded up, one block per sender in order: with 4 mailboxes and 2 names, the first 2 get name 1 and the last 2 get name 2. Because of the rounding, the last names can get a smaller block or none at all: with 4 mailboxes and 3 names, the blocks are 2, 2 and 0, so the third name is not used.
ShowHide child fields
first_namestringrequired1 to 60 charactersFirst name. Up to 60 characters after spaces at the ends are removed.
last_namestringrequired1 to 60 charactersLast name. Up to 60 characters after spaces at the ends are removed.
Response (200)
message"Sender Name Swap Requested"requiredSender Name Swap Requested. The request is open; nothing has changed yet.
Responses
- 200OK. The request is open. Our team will carry it out.
- 400Invalid domain.
old_is not a domain name (nodomain www., letters, digits and hyphens, an ending of 2 or more letters). - 400No mode.
modeis missing or notname_/only name_.and_ alias - 400Invalid names.
sender_is missing or empty, has more than 100 entries, or an entry has an empty or too longnames first_/name last_.name - 400Too many names. More names than the domain has mailboxes. A domain with no mailboxes answers
no_instead.mailboxes - 400Addresses can't be made. In
name_mode: a name can't give enough different addresses for its block, or two names give the same address.and_ alias - 400Nothing to change. A mailbox would keep both its name and its address. Every mailbox of the domain is part of the request, so check names already in use.
- 409Address taken. In
name_mode: a new address is the current address of another mailbox on this domain.and_ alias - 404Domain not found. No such domain in this workspace (a domain of another workspace looks the same), or it is being cancelled.
- 404Mailbox gone. A mailbox of the domain was cancelled while the request was being made. Try again.
- 409Request already open. This domain already has an open Sender Names 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.
