1. Domain
Scaledmail
  • Scaledmail API Documentaion
  • Workspaces
    • Get Workspaces
      GET
    • Create Workspace
      POST
  • Pre Warm Inboxes
    • Pre Warm Inboxes
      GET
    • Buy Pre Warm Inboxes
      POST
  • Domain
    • Get Domains
      GET
    • Get Domain Masking
      GET
    • Get Purchased Domains
      GET
    • Buy Domains
      POST
    • Search Domains
      POST
    • Suggest Domains
      POST
    • Update Sender Name
      POST
    • Update Domain Name
      POST
    • Update Domain Redirect
      POST
    • Update Domain Masking
      POST
  • Package
    • Calculate Package
      POST
    • Get Packages
      GET
  • Order
    • Get Orders
      GET
    • Get Order Details
      GET
    • Cancel Order
      DELETE
    • Create Order
      POST
    • Create Custom Order
      POST
    • Update Order Tag
      PATCH
  • Mailboxes
    • Get Mailboxes by Domain ID
      GET
  • Stats
    • Get Reporting Stats
  1. Domain

Update Domain Masking

POST
https://server.scaledmail.com/api/v1/swap-domain-masking/{domain}
🎭 Use this endpoint to request a change to which domain a Domain Masking proxy points to.
âš ī¸ This creates a pending request, same as /swap-domain and /swap-redirect — it does not take effect immediately. Our team reviews and applies it.

🔑 Authentication#

Requires a valid API token.
POST /api/v1/swap-domain-masking/:old_domain

🔑 Path Parameters#

old_domain (required)#

The masking domain whose target you want to change. Must already have Domain Masking enabled — see Get Domain Masking to list your masking domains.

🔑 Query Parameters#

organization_id (required)#

Your organization's ID. The domain must belong to this organization.

đŸ“Ĩ Request Body Parameters#

new_primary_domain (required)#

The domain this masking domain should point to instead.
{ "new_primary_domain": "newbrand.com" }
Must be a non-empty string.
Cannot be the same as the domain's current primary_domain.

📋 Example Request#

POST /api/v1/swap-domain-masking/mask-one.com?organization_id=recXXXXXXXXXXXXXX
{
  "new_primary_domain": "newbrand.com"
}

✅ Response#

{
  "message": "Domain Masking Swap Requested"
}

âš ī¸ Error Responses#

Invalid domain format#

{ "error": "Invalid domain format" }

Missing new_primary_domain#

{ "error": "new_primary_domain is required" }

Domain masking proxy not found#

{ "error": "Domain masking proxy not found" }

Same primary domain#

{ "error": "Cannot use same primary domain" }

Conflicting pending request already exists#

{ "error": "Cannot create domain swap request. Domain \"mask-one.com\" already has a pending Domain Masking change request (Status: New Order)" }

â„šī¸ Notes#

Works for both ScaledMail-hosted (internal) and bring-your-own-domain (external) masking proxies.
Use Get Domain Masking to look up a domain's current primary_domain before requesting a change.
Don't call /swap-redirect on a masked domain — it will reject the request and tell you to use this endpoint instead.
This endpoint cannot be used by test accounts.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Query Params

Body Params text/plain
Examples

Responses

đŸŸĸ200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://server.scaledmail.com/api/v1/swap-domain-masking/?organization_id=undefined' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/plain' \
--data '{
 "new_redirect":"scaledmail.com"
}'
Response Response Example
{}
Modified at 2026-10-03 15:41:35
Previous
Update Domain Redirect
Next
Calculate Package
Built with