API 参考
Blog categories
Management API: GET /sites/{id}/blog/categories, POST /sites/{id}/blog/categories
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 · pathrequiredWebsite id. Get it from sites.list or from sites.create.
limitinteger · queryMaximum number of items to return, 1–100. Defaults to 20.
cursorstring · queryOpaque cursor from the previous page's nextCursor. Omit for the first page.
Response 200
dataobject[]requireddata[].idstringrequireddata[].slugstringrequireddata[].namestringrequireddata[].descriptionstring | nullrequireddata[].sortOrderintegerrequireddata[].countsobjectrequiredPublished post count.
data[].counts.postsintegerrequiredNumber of published posts in this taxonomy.
hasMorebooleanrequiredTrue when another page exists; pass nextCursor to fetch it.
nextCursorstring | nullrequiredCursor for the next page, or null on the last page.
Errors
FORBIDDEN403INVALID_CURSOR400
MCP tool blog_categories_list
curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/blog/categories" \
-H "Authorization: Bearer $KANORIO_TOKEN"{
"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 (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 · pathrequiredWebsite id. Get it from sites.list or from sites.create.
Request body
namestringrequiredDisplay name of the category.
slugstringURL slug; generated automatically from name when omitted.
descriptionstringOptional category description.
Response 201
categoryobjectrequiredcategory.idstringrequiredcategory.slugstringrequiredcategory.namestringrequiredcategory.descriptionstring | nullrequiredcategory.sortOrderintegerrequiredcategory.countsobjectrequiredPublished post count.
category.counts.postsintegerrequiredNumber of published posts in this taxonomy.
Errors
FORBIDDEN403VALIDATION400SLUG_TAKEN409
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."}'{
"category": {
"id": "cat_example01",
"slug": "bread-notes",
"name": "Bread Notes",
"description": "Notes from the bakehouse.",
"sortOrder": 0,
"counts": {
"posts": 0
}
}
}