---
title: "List context folders"
method: GET
path: "/api/v1/context/folders"
tags: ["Context"]
---

# List context folders

`GET /api/v1/context/folders`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/context/folders`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Returns the organization's folder tree as a flat list of folders with parentId, name, slug, path, depth, and the active-document count directly within each folder.

## Response `200`

The organization's folders.

- object
  - `folders` object[], required
    - `id` string, required
    - `parentId` string, nullable, required: null at the organization root.
    - `name` string, required
    - `slug` string, required
    - `path` string, required: Slash-joined ancestor slugs.
    - `depth` integer, required: 0 at the organization root.
    - `documentCount` integer, required: Active documents directly in this folder.
    - `createdAt` string, required
    - `updatedAt` string, required

## Other responses

- `401`: Authentication is missing or invalid.
- `429`: Too many requests; retry after the indicated delay.

---

[API](https://skmtc.dev/khotan/apis/khotan-api.md) - [All operations](https://skmtc.dev/khotan/apis/khotan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khotan/apis/khotan-api/revisions/90b512a53e42?raw)
