---
title: "フォルダの一覧"
method: GET
path: "/knowledge/folders"
tags: ["Folders"]
---

# フォルダの一覧

`GET /knowledge/folders`

## Request

- Base URL: `https://api.leafchat.app/api/v1`
- URL: `https://api.leafchat.app/api/v1/knowledge/folders`
- Auth: HTTP bearer

既定のフォルダが先頭。is_global のフォルダはすべてのサイトから参照され、それ以外は sites に挙げたサイトだけが参照する

## Response `200`

組織のフォルダ

- object
  - `folders` Folder[], required
    - `id` string, required
    - `name` string, required
    - `is_global` boolean, required
    - `is_default` boolean, required
    - `sites` object[], required
      - `id` string, required
      - `name` string, required

## Other responses

- `401`: API キーが無いか無効（期限切れ・失効・削除の途中の組織を含み、理由は区別しない） 返る code：`unauthorized`
- `403`: この API キーの用途か、対象のソースでは実行できない 返る code：`forbidden`・`needs_draft`
- `429`: 上限を超えた。Retry-After の秒数だけ待ってからやり直す。上限は、API キーごとに 1 分 120 回（REST と MCP で共通）・同期の実行は鍵ごとに 1 分 10 回（dry_run は数えない）・組織の文書の書き込みは 1 分 300 版・API キーの検証の失敗は IP ごとに 1 分 20 回（超えると、正しい鍵でも 429 になる）。このほか、IP ごとの上限を超えると Cloudflare が 429（error code 1015）を返す。この応答は problem+json でないことがあり、Retry-After が無ければ少し待ってからやり直す 返る code：`rate_limited`
- `500`: サーバーで問題が起きた。少し待ってからやり直す 返る code：`internal_error`

---

[API](https://skmtc.dev/leafchat/apis/leafchat-api.md) · [All operations](https://skmtc.dev/leafchat/apis/leafchat-api/llms.txt) · [OpenAPI document](https://skmtc.dev/leafchat/apis/leafchat-api/revisions/2667db05c2ff?raw)
