Skip to main content
POST
Set Custom Domain
Is necessary to have at least the Standard plan to use this route. The same account may attach one domain to multiple applications (load balancing): up to 2 applications on Standard, 5 on Pro, and 10 on Enterprise. See List Load Balancers.
Authorization
string
required
The API key for your account. You can find this in your account settings.
Replacing an existing custom domain releases the previous hostname at the edge before attaching the new one, unless another application on the same account still points at it. The same validation runs whether attaching or removing (custom: "@"): on a workspace-shared application, the caller needs the workspace Administrator role or ownership. A domain can only be claimed by one account at a time: attaching a hostname already held by another account returns DOMAIN_ALREADY_EXISTS. To see every hostname configured across your applications, see List Domains. Once attached, fetch the required validation records with Get DNS Records.

Parameters

app_id
string
required
The ID of the application. You can find this in the URL of your application’s dashboard.
custom
string
required
The fully qualified domain to attach, or @ to remove the application’s current custom domain. It cannot be a Square Cloud domain (squareweb.app, squarecloud.app, …).

Response

status
string
Indicates whether the call was successful.. success if successful, error if not.
On failure, the response includes an error code: