Kanorio

API 参考

Segments

Management API: GET /sites/{id}/segments

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

List segments

GET/sites/{id}/segments
betacustomers:viewdefault (120/minute per token)

List contact segments with their rules and live audience counts. Use a segment id as campaigns.* audience. 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[].namestringrequired
  • data[].descriptionstring | nullrequired
  • data[].isSystembooleanrequired

    System segments (e.g. all subscribers) are read-only.

  • data[].systemKeystring | nullrequired
  • data[].rulesobjectrequired
  • data[].countsobjectrequired

    Live audience counts: matched = all contacts matching the rules; sendable = with valid email consent.

  • data[].counts.matchedintegerrequired
  • data[].counts.sendableintegerrequired
  • 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 segments_list

curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/segments" \
  -H "Authorization: Bearer $KANORIO_TOKEN"
Response
{
  "data": [
    {
      "id": "seg_example01",
      "name": "Ordered in the last 90 days",
      "description": null,
      "isSystem": false,
      "systemKey": null,
      "rules": {
        "lastOrderWithinDays": 90
      },
      "counts": {
        "matched": 340,
        "sendable": 320
      }
    }
  ],
  "hasMore": false,
  "nextCursor": null
}