Kanorio Developer Portal

Use Kanorio as a full hosted website or as a headless content, commerce, membership, and digital-delivery backend for your own Next.js, Astro, or mobile storefront.

API & Component Surfaces

Every specification below is generated directly from machine-readable OpenAPI schemas and event registries.

Three Credentials & Three Distinct Rights

Kanorio strictly separates credentials by caller and keeps operational permissions, customer entitlements, and plan entitlements distinct.
1. Content Delivery (Public)Anonymous

Browser-safe reads at https://{site}/api/v1/*. Draft preview uses read-only X-Kanorio-Preview: knr_pv_... on your server.

2. Management & MCPServer Only

Personal Access Tokens (knr_pat_) and OAuth 2.1 (knr_at_) evaluate operational RBAC (lib/permissions). Never expose in browser bundles.

3. Customer SessionBuyer Scoped

Customer Bearer tokens (knr_cat_) identify a single (websiteId, contactId) and evaluate commercial Entitlements (separate from team RBAC and SaaS plan tiers).

7 Business Primitives at a Glance

Full 12-domain matrix
Check which primitives are ready for your architecture before you start.

MCP Server Setup, Safety Model & When to Use MCP vs. API/CLI

Connect Kanorio's remote Streamable HTTP MCP server (https://app.kanorio.com/api/mcp) via OAuth 2.1 + PKCE or a Personal Access Token (knr_pat_).
MCP Client Configuration (Claude Code, Cursor, Codex)
# 1. Claude Code (OAuth 2.1 browser prompt, or pass --header "Authorization: Bearer knr_pat_...")
claude mcp add --transport http kanorio https://app.kanorio.com/api/mcp

# 2. Cursor (.cursor/mcp.json) / Windsurf / VS Code
{
  "mcpServers": {
    "kanorio": {
      "url": "https://app.kanorio.com/api/mcp",
      "headers": { "Authorization": "Bearer knr_pat_..." }
    }
  }
}

# 3. Codex (~/.codex/config.toml)
[mcp_servers.kanorio]
url = "https://app.kanorio.com/api/mcp"
bearer_token_env_var = "KANORIO_TOKEN"
  • Role-scoped & site-scoped by default: Every MCP session or PAT inherits the granting team member's RBAC permissions (system OWNER/ADMIN or custom roles) and is scoped to a single selected website by default. tools/list dynamically filters out tools your token lacks scope for.
  • Sensitive scopes excluded from agents (`AGENT_EXCLUDED_SCOPES`): Bulk data exports (site:export, commerce:export, customers:export, marketing:export, collections:export, analytics:export), refunds (commerce:refund), team, billing and payments (members:manage, members:view, billing:manage, billing:view, payments:manage, payments:view), sending campaigns and sender settings (marketing:send, messaging:settings), and site ownership transfer (site:transfer) can never be granted to PAT or OAuth tokens. Agents create and edit campaign drafts with marketing:manage; sending stays in the dashboard. orders:fulfill, seo:view and seo:manage are not offered yet because no capability uses them.
  • Draft-first page writes & optimistic concurrency: Page and theme mutations write to the site draft until site.publish is called; pages.replace_sections and globals.* enforce ifUnmodifiedSince optimistic locking so concurrent human and agent edits never clobber each other. Collection item mutations default to publish: true (pass publish: false to stage drafts).
  • Tamper-evident attribution & instant rollback: Every agent write is logged in the site's Activity Log (/settings activity) with the specific token and client identity, backed by 30-day page/post revision snapshots.
  • When to use MCP vs. CLI / REST API: Use MCP for interactive modeling, content drafting, and exploratory site setup inside Cursor, Claude, ChatGPT, or Codex; use REST API / `@kanorio/sdk` / `@kanorio/cli` (npx @kanorio/cli types, npx @kanorio/cli doctor) for deterministic CI/CD pipelines, build-time type generation, and automated scripts.

Guides & Machine-Readable Discovery

Append `.md` to any `/developers` URL (or send `Accept: text/markdown`) to fetch a clean Markdown version for AI coding agents.