Domain changes
Update redirect
Set, change or remove the web address a domain redirects to. For a domain that uses domain masking, use POST /swap-domain-masking/:old_ instead.
https://server.scaledmail.com/api/v1/swap-redirect/: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.
Redirect changes are usually carried out by our system within minutes, without anyone on our team. If it can't do one, our team takes it over. The redirect is saved without https://, without a slash at the end and in lower case, so GET /domains shows demo-domain-9..
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.. . .
Body
new_redirectstring | nullrequiredWhere visitors of the domain should go, like
demo-domain-9..com/page https://(orhttp://) is optional; without it at most 253 characters. Send""ornullto remove the redirect. The field itself is required.
Response (200)
message"Redirect Swap Requested"requiredRedirect Swap Requested. The request is open; nothing has changed yet.
Responses
- 200OK. The request is open.
- 400No redirect field. The body has no
new_field.redirect - 400Invalid domain.
old_is not a domain name (nodomain www., letters, digits and hyphens, an ending of 2 or more letters). - 400Invalid redirect.
new_is not a web address likeredirect demo-domain-9.orcom demo-domain-9., or is longer than 253 characters withoutcom/page https://. - 400Same redirect. The domain already redirects to this address (compared without
https://and a slash at the end, case ignored), or you remove a redirect the domain does not have. - 400Uses masking. The domain uses domain masking, not a plain redirect.
- 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 Redirect URL 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.
