Buy a domain
buy_domainBuy a domain for a site and connect it (and www) as the site's live URL. THIS CHARGES THE WORKSPACE'S SAVED CARD for one year of registration, renewing yearly; only call it after the person has seen the domain and price from check_domain and said yes. Pass that price as expectedPriceCents; if the live price differs, nothing is charged and the call is refused. Returns status active (bought and connected), pending (paid, registration finishing; poll get_domain_registration, and if still pending after a minute call buy_domain again with the same domain and makePrimary, which resumes without charging twice), or checkout_required (a workspace with no plan; nothing charged, share checkout_url). Needs the workspace's domain owner contact saved first (set_domain_owner); a refusal says so. Before buying a domain, read the building-sites skill (call skills with name "building-sites").
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": {
"siteId": "<siteId>",
"domain": "<domain>",
"expectedPriceCents": "<expectedPriceCents>"
},
"name": "buy_domain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | The exact domain to buy, lowercase with no scheme, such as 'acmecoffee.com'. Buy the apex; www is connected automatically. | |
| siteId | Yes | The site the domain is for, from list_sites. | |
| makePrimary | No | Make the domain the site's primary URL (canonical links and sitemap). Defaults to true, as in the dashboard. | |
| checkoutPlan | No | Only for a workspace with no paid plan: the plan the person chose to buy with the domain. Then nothing is charged here; the result carries a Stripe Checkout link for the plan plus the domain. Ignored when the workspace already has a plan. | |
| expectedPriceCents | Yes | The first-year price in cents that the person agreed to, from check_domain's priceCents. The purchase is refused, and nothing is charged, if the live price differs. |