Link Domain
Link a custom domain to a webspace. Adds the vhost server-name and writes nginx/OLS config. Free-tier webspaces cannot link custom domains.
Link a custom domain to a webspace. Adds the vhost server-name and writes nginx/OLS config. Free-tier webspaces cannot link custom domains.
Required scope: webspace:manage
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer YOUR_API_KEY |
Content-Type |
Yes | application/json |
| Parameter | Required | Description |
|---|---|---|
domain |
Yes | Full hostname to link (e.g. blog.example.com). |
domainId |
Yes | ID of the user's owning Domain record. |
dnsName |
Yes | Subdomain part for the auto-created A record. Use @ for root. |
{
"data": {
"id": "69ee...",
"domain": "blog.example.com",
"sslActive": false,
"sslExpiry": null,
"createdAt": "2026-04-22T12:34:56.000Z"
}
}
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_DOMAIN |
Hostname is missing or malformed. |
| 403 | FREE_TIER_NO_CUSTOM_DOMAINS |
Free webspaces cannot link custom domains. |
| 404 | DOMAIN_RECORD_NOT_FOUND |
Domain not found or not owned by this user. |
| 409 | DOMAIN_LIMIT_REACHED |
Webspace has reached its allowedDomains limit. |
| 409 | DOMAIN_ALREADY_LINKED |
This hostname is already linked elsewhere. |
curl -X POST https://hosting.site.quest/api/v1/webspaces/69e80ac1.../domains \
-H "Authorization: Bearer sq_live_..." \
-H "Content-Type: application/json" \
-d '{ "domain": "blog.example.com", "domainId": "69dd...", "dnsName": "blog" }'
This endpoint is not yet wrapped as an MCP tool. Use the REST endpoint above directly.