Kanorio

API 參考

Domains

Management API: GET /sites/{id}/domains, PUT /sites/{id}/domains, GET /sites/{id}/domains/status

此頁只有英文版。API 參考、Webhook 事件及變更紀錄維持英文,與程式碼中的欄位名稱、錯誤碼一致。
Base URL https://app.kanorio.com/api/v1ErrorsPagination

List domains

GET/sites/{id}/domains
betaconsole:viewdefault (120/minute per token)

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 · pathrequired

    Website id. Get it from sites.list or from sites.create.

Response 200

  • dataobject[]required
  • data[].hostnamestringrequired
  • data[].kindstringrequired

    CUSTOM_PRIMARY (canonical) or CUSTOM_ALIAS (301 to primary).

  • data[].isPrimarybooleanrequired
  • data[].statusstringrequired

    PENDING until DNS and TLS are verified, then ACTIVE.

  • hasMorebooleanrequired

    True when another page exists; pass nextCursor to fetch it.

  • nextCursorstring | nullrequired

    Cursor for the next page, or null on the last page.

Errors

  • FORBIDDEN 403 · 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"
Response
{
  "data": [
    {
      "hostname": "www.sunnybakery.example",
      "kind": "CUSTOM",
      "isPrimary": true,
      "status": "ACTIVE"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

Bind domains

PUT/sites/{id}/domains
betasite:domainsdefault (120/minute per token)

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 · pathrequired

    Website id. Get it from sites.list or from sites.create.

Request body

  • hostnamesstring[]required

    Ordered hostnames without scheme, e.g. ["www.example.com", "example.com"]. First = primary.

Response 200

  • domainsobject[]required
  • domains[].hostnamestringrequired
  • domains[].kindstringrequired

    CUSTOM_PRIMARY (canonical) or CUSTOM_ALIAS (301 to primary).

  • domains[].isPrimarybooleanrequired
  • domains[].statusstringrequired

    PENDING until DNS and TLS are verified, then ACTIVE.

  • cloudflareErrorsstring[]required

    Non-fatal provisioning errors; the binding is saved and will be reconciled.

  • cooldownsobject | nullrequired

    Removed hostnames → seconds before they can be re-added.

Errors

  • FORBIDDEN 403
  • PRO_REQUIRED 403
  • INVALID_FORMAT 400
  • BLOCKED 422
  • HIGH_RISK_TLD 422
  • LIMIT_REACHED 403 · details.max
  • TAKEN 409 · used by another site
  • READD_COOLDOWN 409 · 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"]}'
Response
{
  "domains": [
    {
      "hostname": "www.sunnybakery.example",
      "kind": "CUSTOM",
      "isPrimary": true,
      "status": "PENDING"
    }
  ],
  "cloudflareErrors": [],
  "cooldowns": null
}

Domain status

GET/sites/{id}/domains/status
betasite:domainsdefault (120/minute per token)

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 · pathrequired

    Website id. Get it from sites.list or from sites.create.

Response 200

  • domainsobject[]required
  • domains[].hostnamestringrequired
  • domains[].kindstringrequired

    CUSTOM_PRIMARY (canonical) or CUSTOM_ALIAS (301 to primary).

  • domains[].isPrimarybooleanrequired
  • domains[].statusstringrequired

    PENDING until DNS and TLS are verified, then ACTIVE.

  • primaryobject | nullrequired
  • primary.hostnamestringrequired
  • primary.statusstringrequired
  • diagnosesobjectrequired

Errors

  • FORBIDDEN 403

MCP tool domains_status

curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/domains/status" \
  -H "Authorization: Bearer $KANORIO_TOKEN"
Response
{
  "domains": [
    {
      "hostname": "www.sunnybakery.example",
      "kind": "CUSTOM",
      "isPrimary": true,
      "status": "ACTIVE"
    }
  ],
  "primary": {
    "hostname": "www.sunnybakery.example",
    "status": "ACTIVE"
  },
  "diagnoses": {}
}