> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyformat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List

> List a workflow's knowledge corpus tree: documents and navigation pages

*Rate limit tier: **general**, 600 requests/min. See [Rate limits](/api-reference-v3/introduction#rate-limits).*

Lists a workflow's knowledge corpus: every source document plus the generated navigation pages, sorted by path. This is the tree an agent would browse instead of asking a question — for reading what documents exist and where, not for an answer. To ask a question with citations, use [Ask](/api-reference-v3/knowledge/ask).

Each item's `kind` is `document` for a source file or `index` for a generated navigation page; a navigation page's `page_count` is always `0`.

## Requires a knowledge base

Same requirement as `ask`: the workflow needs a **knowledge node**, or this returns `409 KNOWLEDGE_NOT_ENABLED`. `409 KNOWLEDGE_NOT_READY` means no usable snapshot has ever been published — wait if indexing is in progress. Unlike `ask`, listing is never billed, so `402` cannot occur here.

## Pagination

One keyset page per call, sorted by `path`. Follow `next_cursor` until it is `null`. See [Pagination](/api-reference-v3/introduction#pagination).

## Folder

Pass `folder` to narrow the tree to entries directly inside that folder or one beneath it. Omit it for the whole corpus.

## Errors

| Status | `error_code`            | Meaning                                                                                                                                                            |
| ------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `404`  | `NOT_FOUND`             | Unknown workflow, or one belonging to another organization; or `folder` names no folder in this corpus.                                                            |
| `409`  | `KNOWLEDGE_NOT_ENABLED` | The workflow has no Knowledge node. Do not retry: add the node first.                                                                                              |
| `409`  | `KNOWLEDGE_NOT_READY`   | No knowledge snapshot has ever been published for this workflow. Wait if indexing is in progress; otherwise index existing documents from the app's Knowledge tab. |
| `422`  | `VALIDATION_ERROR`      | `cursor` is not a token this endpoint issued, or `folder` is malformed (a leading or trailing slash, or a `..` segment).                                           |
| `504`  | `GATEWAY_TIMEOUT`       | The listing exceeded the agent's own time ceiling. Retry.                                                                                                          |

<RequestExample>
  ```bash curl theme={null}
  curl -X GET 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/knowledge/entries?folder=2026-07' \
    -H 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```python Python (requests) theme={null}
  import requests

  workflow_id = "0686bb97-8c30-70f0-8000-97669e000eb8"
  url = f"https://api.anyformat.ai/v3/workflows/{workflow_id}/knowledge/entries"
  headers = {"Authorization": "Bearer YOUR_API_KEY"}

  page = requests.get(url, headers=headers, params={"folder": "2026-07"}).json()
  for entry in page["items"]:
      print(entry["path"], entry["kind"])
  ```
</RequestExample>

<ResponseExample>
  ```json Response (200 OK) theme={null}
  {
    "items": [
      {
        "path": "2026-07/aldrete-supply.md",
        "kind": "document",
        "folder": "2026-07",
        "title": "Aldrete supply agreement",
        "page_count": 5
      },
      {
        "path": "2026-07/meridian-msa.md",
        "kind": "document",
        "folder": "2026-07",
        "title": "Meridian MSA",
        "page_count": 3
      }
    ],
    "next_cursor": null
  }
  ```

  ```json Response (409, no knowledge base) theme={null}
  {
    "error": "Knowledge base not enabled",
    "detail": "This workflow has no knowledge base. Add a knowledge node. New completed runs then ingest documents; index earlier processed documents from the app's Knowledge tab.",
    "error_code": "KNOWLEDGE_NOT_ENABLED",
    "retryable": false
  }
  ```
</ResponseExample>
