API リファレンス
Domains
Management API: GET /sites/{id}/domains, PUT /sites/{id}/domains, GET /sites/{id}/domains/status
List the custom domains bound to a website (primary first) with their verification status, all in one page. Errors: FORBIDDEN (also when the website does not exist).
Parameters
idstring · pathrequiredWebsite id. Get it from sites.list or from sites.create.
Response 200
dataobject[]requireddata[].hostnamestringrequireddata[].kindstringrequiredCUSTOM_PRIMARY (canonical) or CUSTOM_ALIAS (301 to primary).
data[].isPrimarybooleanrequireddata[].statusstringrequiredPENDING until DNS and TLS are verified, then ACTIVE.
hasMorebooleanrequiredTrue when another page exists; pass nextCursor to fetch it.
nextCursorstring | nullrequiredCursor for the next page, or null on the last page.
Errors
FORBIDDEN403 · also when the website does not exist
MCP tool domains_list
curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/domains" \
-H "Authorization: Bearer $KANORIO_TOKEN"{
"data": [
{
"hostname": "www.sunnybakery.example",
"kind": "CUSTOM",
"isPrimary": true,
"status": "ACTIVE"
}
],
"hasMore": false,
"nextCursor": null
}Set the complete list of custom domains for a website: the first hostname becomes the primary (canonical) domain, the rest become aliases that 301-redirect to it. Hostnames missing from the list are unbound; pass an empty list to remove all custom domains. After binding, the owner must point DNS (CNAME) at Kanorio; call domains.status to see the exact record and verification progress. Requires a paid plan. Errors: FORBIDDEN, PRO_REQUIRED, INVALID_FORMAT, BLOCKED, HIGH_RISK_TLD, LIMIT_REACHED (details.max), TAKEN (used by another site), READD_COOLDOWN (details.retryAfterSeconds).
Parameters
idstring · pathrequiredWebsite id. Get it from sites.list or from sites.create.
Request body
hostnamesstring[]requiredOrdered hostnames without scheme, e.g. ["www.example.com", "example.com"]. First = primary.
Response 200
domainsobject[]requireddomains[].hostnamestringrequireddomains[].kindstringrequiredCUSTOM_PRIMARY (canonical) or CUSTOM_ALIAS (301 to primary).
domains[].isPrimarybooleanrequireddomains[].statusstringrequiredPENDING until DNS and TLS are verified, then ACTIVE.
cloudflareErrorsstring[]requiredNon-fatal provisioning errors; the binding is saved and will be reconciled.
cooldownsobject | nullrequiredRemoved hostnames → seconds before they can be re-added.
Errors
FORBIDDEN403PRO_REQUIRED403INVALID_FORMAT400BLOCKED422HIGH_RISK_TLD422LIMIT_REACHED403 · details.maxTAKEN409 · used by another siteREADD_COOLDOWN409 · details.retryAfterSeconds
MCP tool domains_bind
curl -X PUT "https://app.kanorio.com/api/v1/sites/{id}/domains" \
-H "Authorization: Bearer $KANORIO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hostnames":["www.sunnybakery.example","sunnybakery.example"]}'{
"domains": [
{
"hostname": "www.sunnybakery.example",
"kind": "CUSTOM",
"isPrimary": true,
"status": "PENDING"
}
],
"cloudflareErrors": [],
"cooldowns": null
}Re-check DNS/TLS for every PENDING custom domain right now and return the current list. Domains that are still PENDING include a `diagnoses[hostname]` entry explaining what record is missing (expected vs. observed). Also returns the primary binding. Poll every 15-60 seconds after domains.bind until status is ACTIVE; DNS propagation can take minutes to hours. Errors: FORBIDDEN.
Parameters
idstring · pathrequiredWebsite id. Get it from sites.list or from sites.create.
Response 200
domainsobject[]requireddomains[].hostnamestringrequireddomains[].kindstringrequiredCUSTOM_PRIMARY (canonical) or CUSTOM_ALIAS (301 to primary).
domains[].isPrimarybooleanrequireddomains[].statusstringrequiredPENDING until DNS and TLS are verified, then ACTIVE.
primaryobject | nullrequiredprimary.hostnamestringrequiredprimary.statusstringrequireddiagnosesobjectrequired
Errors
FORBIDDEN403
MCP tool domains_status
curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/domains/status" \
-H "Authorization: Bearer $KANORIO_TOKEN"{
"domains": [
{
"hostname": "www.sunnybakery.example",
"kind": "CUSTOM",
"isPrimary": true,
"status": "ACTIVE"
}
],
"primary": {
"hostname": "www.sunnybakery.example",
"status": "ACTIVE"
},
"diagnoses": {}
}