Add custom domain
add_custom_domainUse when the user wants the site on their own domain (owners and admins who edit the site). Points "deck.acme.com" at SnapHost. With site_id the domain shows that one site (Pro); with target: "workspace" (a Pro workspace) it becomes the workspace’s sharing domain, where every site and folder link opens. Returns required_dns_records: a pointing record and a TXT ownership record, both needed. Relay them exactly; live once both resolve. mode "viewer" (default) shows the site in the SnapHost viewer. mode "website" makes the site a public website at the domain, for good: only an owner can, it needs a team workspace on a paid plan and an HTML site, and it removes every share and makes the site public. Make one only after the person confirms. A shared-page address already added for this site becomes the website when you call again with the same host, site_id and mode "website". mode "redirect" sends visitors to the site’s website (up to 3 redirect addresses). listed (website only, default true) lets search engines list it. A domain on another site: remove_custom_domain there first. A view password, link expiry or allowlist must be removed first: ask the person before removing any.
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": {
"host": "<host>"
},
"name": "add_custom_domain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | The domain or subdomain, e.g. deck.acme.com | |
| mode | No | "viewer" (default), "website" (public website at this domain, owners only, permanent address) or "redirect" (send visitors to the site’s website domain) | |
| listed | No | With mode "website": true (default) lets search engines list it, false asks them to skip it | |
| target | No | "site" (default) binds one site; "workspace" makes the domain the Pro workspace’s sharing domain | |
| site_id | No | The site to bind the domain to. On target "workspace" it is optional and names the Shared drive site shown at the bare / of the sharing domain. | |
| workspace_id | No | Optional: the workspace to act in, from list_workspaces (the connection reaches the person's personal space and every workspace they are a member of). Required on a write when the connection reaches more than one workspace. Omit to act in the personal space (for an older single-workspace connection, the one workspace it was authorized for). |