Kanorio

API 参考

Blog categories

Management API: GET /sites/{id}/blog/categories, POST /sites/{id}/blog/categories

本页只有英文版。API 参考、Webhook 事件和更新日志保持英文,与代码中的字段名称、错误码一致。
Base URL https://app.kanorio.com/api/v1ErrorsPagination

List blog categories

GET/sites/{id}/blog/categories
betaposts:viewdefault (120/minute per token)

List this website's blog categories (id, slug, name, counts.posts). Use the ids in posts.create / posts.update categoryIds and primaryCategoryId. Errors: FORBIDDEN, INVALID_CURSOR.

Parameters

  • idstring · pathrequired

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

  • limitinteger · query

    Maximum number of items to return, 1–100. Defaults to 20.

  • cursorstring · query

    Opaque cursor from the previous page's nextCursor. Omit for the first page.

Response 200

  • dataobject[]required
  • data[].idstringrequired
  • data[].slugstringrequired
  • data[].namestringrequired
  • data[].descriptionstring | nullrequired
  • data[].sortOrderintegerrequired
  • data[].countsobjectrequired

    Published post count.

  • data[].counts.postsintegerrequired

    Number of published posts in this taxonomy.

  • 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
  • INVALID_CURSOR 400

MCP tool blog_categories_list

curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/blog/categories" \
  -H "Authorization: Bearer $KANORIO_TOKEN"
Response
{
  "data": [
    {
      "id": "cat_example01",
      "slug": "bread-notes",
      "name": "Bread Notes",
      "description": "Notes from the bakehouse.",
      "sortOrder": 0,
      "counts": {
        "posts": 3
      }
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

Create a blog category

POST/sites/{id}/blog/categories
betablog:managedefault (120/minute per token)

Create a blog category (name, optional slug and description). Returns the created category with its id for use in posts.create / posts.update. Errors: FORBIDDEN, VALIDATION, SLUG_TAKEN.

Parameters

  • idstring · pathrequired

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

Request body

  • namestringrequired

    Display name of the category.

  • slugstring

    URL slug; generated automatically from name when omitted.

  • descriptionstring

    Optional category description.

Response 201

  • categoryobjectrequired
  • category.idstringrequired
  • category.slugstringrequired
  • category.namestringrequired
  • category.descriptionstring | nullrequired
  • category.sortOrderintegerrequired
  • category.countsobjectrequired

    Published post count.

  • category.counts.postsintegerrequired

    Number of published posts in this taxonomy.

Errors

  • FORBIDDEN 403
  • VALIDATION 400
  • SLUG_TAKEN 409

MCP tool blog_categories_create

curl -X POST "https://app.kanorio.com/api/v1/sites/{id}/blog/categories" \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Bread Notes","description":"Notes from the bakehouse."}'
Response
{
  "category": {
    "id": "cat_example01",
    "slug": "bread-notes",
    "name": "Bread Notes",
    "description": "Notes from the bakehouse.",
    "sortOrder": 0,
    "counts": {
      "posts": 0
    }
  }
}