domain_attach
Binds a domain to a web service and issues a certificate. Returns the DNS record to create; the certificate is issued once that record resolves, usually within a minute. Until then the domain is listed as pending, which is not an error. A name under a domain (app.example.com, www.example.com) takes a CNAME. A bare domain (example.com) takes an A record to a fixed address and, by default, redirects to www.example.com, which is attached with it if it is not already; this works at any DNS provider. Pass serve: true to answer on the bare domain itself instead of redirecting, for a site whose address people know without the www, or a webhook or API that calls it (a redirect drops the body of a POST for clients that do not follow it).
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": {
"productId": "<productId>",
"hostname": "<hostname>"
},
"name": "domain_attach"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serve | No | Bare domains only. Answer on the bare domain itself instead of redirecting to www. www is still attached with it. | |
| confirm | No | Required for destructive operations. Without it a destructive call returns its plan and refuses, exactly as dry_run would. | |
| dry_run | No | Return the plan without applying it: the resources it would create, change or destroy, and an estimated monthly cost. Free, and has no side effects. Call this before any change you have not made before. | |
| hostname | Yes | Fully qualified, e.g. app.example.com or example.com. | |
| productId | Yes | Product identifier, e.g. prd_7k2m9x4qw1nv8bz3ct6d. | |
| service_id | No | A web service id, or the id of the auth service (aut_...) to give auth its own domain. Defaults to the environment's only web service when there is exactly one. | |
| environment | No | Environment within a Product. Every Product has production; preview and development are optional. pr-<number> is the preview of an open pull request, made and removed by the GitHub integration on Pro. | |
| idempotency_key | No | Replaying the same key returns the original result instead of acting twice. Strongly recommended for anything that creates a resource or spends money. |