Kanorio

Get started

Quickstart

Create a token, make your first Management API call, publish a post and read it back from the Content Delivery API in about ten minutes.

This quickstart takes you from nothing to a published blog post you created with code and read back from your site's public API.

Before you start

  • A Kanorio account with at least one site. A blank site is fine.
  • curl, or Node.js 20 or later if you want to use the SDK.

1. Create a personal access token

Personal access tokens start with knr_pat_ and act as you, limited to the sites and permissions you pick.

  1. Open Account settings › API access and select Create key.
  2. Choose Other tools, select the site you want to use, and pick the Edit content permission preset. Publishing needs Full access or the publish permission.
  3. Copy the token. It is shown once.
export KANORIO_TOKEN="knr_pat_..."

Keep the token on the server. Never put it in browser code or a public repository. See Authentication for the other token types.

2. List your sites

Every Management API request goes to https://app.kanorio.com/api/v1 with the token as a Bearer credential.

curl https://app.kanorio.com/api/v1/sites \
  -H "Authorization: Bearer $KANORIO_TOKEN"

Lists come back in the same envelope everywhere. Note the site id and its publicUrl.

{
  "data": [
    {
      "id": "ws_example123",
      "name": "Sourdough Studio",
      "role": "OWNER",
      "isPublished": true,
      "publicUrl": "https://sourdough.kanorio.com"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

3. Create a draft post

Writes create drafts. Nothing changes on the live site until you publish.

curl -X POST https://app.kanorio.com/api/v1/sites/ws_example123/posts \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "How we feed our sourdough starter",
    "excerpt": "The first thing we do every morning.",
    "contentMarkdown": "## Flour and water\n\nEqual weights, twice a day."
  }'

The response is the post itself, with "status": "DRAFT" and an id such as post_example01.

4. Publish it

curl -X POST https://app.kanorio.com/api/v1/sites/ws_example123/posts/post_example01/publish \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

If the response is an error with code SITE_NOT_PUBLISHED, publish the site once with POST /sites/{id}/publish and try again. Errors always have the same shape, described in Errors.

5. Read it from the Content Delivery API

Published content is readable without a token from your site's own address. Use the publicUrl from step 2, or the permanent system URL shown under Site settings › Developer.

curl "https://sourdough.kanorio.com/api/v1/collections/blog/items?limit=1&fields=title,excerpt"
{
  "data": [
    {
      "id": "post_example01",
      "slug": "how-we-feed-our-starter",
      "publishedAt": "2026-11-02T08:00:00.000Z",
      "fieldData": {
        "title": "How we feed our sourdough starter",
        "excerpt": "The first thing we do every morning."
      }
    }
  ],
  "hasMore": false,
  "nextCursor": null,
  "assets": {}
}

Do the same with the SDK

npm install @kanorio/sdk
import { createDeliveryClient, createManagementClient } from "@kanorio/sdk";

const management = createManagementClient({ token: process.env.KANORIO_TOKEN! });
const sites = await management.get("/sites");
const site = sites.data[0]!;

const post = await management.post("/sites/{id}/posts", {
  params: { id: site.id },
  body: { title: "How we feed our sourdough starter", contentMarkdown: "## Flour and water" },
});
await management.post("/sites/{id}/posts/{postId}/publish", { params: { id: site.id, postId: post.id }, body: {} });

const delivery = createDeliveryClient({ siteUrl: site.publicUrl! });
const latest = await delivery.get("/collections/{key}/items", { params: { key: "blog" }, query: { limit: 1 } });
console.log(latest.data[0]?.slug);

Next steps