Kanorio

API 參考

Blog tags

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

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

List blog tags

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

List this website's blog tags (id, slug, name, counts.posts). Use the ids in posts.create / posts.update tagIds. 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[].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_tags_list

curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/blog/tags" \
  -H "Authorization: Bearer $KANORIO_TOKEN"
Response
{
  "data": [
    {
      "id": "tag_example01",
      "slug": "sourdough",
      "name": "Sourdough",
      "counts": {
        "posts": 3
      }
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

Create a blog tag

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

Create a blog tag (name, optional slug). Returns the created tag with its id for use in posts.create / posts.update tagIds. 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 tag.

  • slugstring

    URL slug; generated automatically from name when omitted.

Response 201

  • tagobjectrequired
  • tag.idstringrequired
  • tag.slugstringrequired
  • tag.namestringrequired
  • tag.countsobjectrequired

    Published post count.

  • tag.counts.postsintegerrequired

    Number of published posts in this taxonomy.

Errors

  • FORBIDDEN 403
  • VALIDATION 400
  • SLUG_TAKEN 409

MCP tool blog_tags_create

curl -X POST "https://app.kanorio.com/api/v1/sites/{id}/blog/tags" \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Sourdough"}'
Response
{
  "tag": {
    "id": "tag_example01",
    "slug": "sourdough",
    "name": "Sourdough",
    "counts": {
      "posts": 0
    }
  }
}