Choose a website's primary custom domain
airapps_site_set_primary_domainMakes one bound hostname the primary: every other custom domain of the website answers a permanent redirect (308) to it, keeping the path and query. hostname: null clears the primary so every domain serves the site directly. The generated address never redirects. The first domain bound becomes primary automatically.
POST /api/v1/airapps/{nodeId}/site/domains/primary
For multi-space accounts, call auth_verify, ask the user which space to use, and pass targetSpaceId. An AirApp's website: after its files change, deploy the members-only preview, then go live to put that same version on the public address. Changes to records need no redeploy. Change the primary domain only when the user asks: every other custom domain then redirects to it. hostname null stops the redirects. A PRECONDITION_FAILED saying primary domains are not supported means this deployment cannot redirect yet.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"nodeId": "<nodeId>",
"hostname": "<hostname>"
},
"name": "airapps_site_set_primary_domain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | ||
| hostname | Yes | ||
| targetSpaceId | No | Busabase space id. Call auth_verify first and ask the user which space to use when more than one is returned. |