---
title: "List knowledge files"
method: GET
path: "/knowledge-files"
tags: ["KnowledgeFiles", "Beta"]
---

# List knowledge files

`GET /knowledge-files`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/knowledge-files`
- Auth: API key in header `X-ESCAPE-API-KEY`

List the files of the organization knowledge library, with cursor pagination. Files are used as context by AI pentests.

## Query parameters

- `cursor` string: The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned.
- `size` integer: The number of items to return per page
- `sortType` 'CREATED_AT' | 'KIND' | 'NAME' | 'STATUS': The type to sort by
- `sortDirection` 'asc' | 'desc': The direction to sort by

## Response `200`

OK

- object
  - `nextCursor` string, nullable, required
  - `totalCount` integer
  - `data` object[], required
    - `id` string, uuid, required: The id of the knowledge file
    - `name` string, required: The name of the knowledge file
    - `kind` 'CSV' | 'DOC' | 'DOCX' | 'FILE' | 'GRAPHQL' | 'HTML' | 'JSON' | 'MD' | 'ODT' | 'PDF' | 'PPT' | 'PPTX' | 'TAR_GZ' | 'TXT' | 'XLS' | 'XLSX' | 'XML' | 'ZIP', required: The kind of the knowledge file
    - `status` 'COMPLETED' | 'FAILED' | 'PENDING' | 'PROCESSING', required: The processing status of the knowledge file
    - `sizeInBytes` integer, nullable, required: The size of the knowledge file in bytes, known once processing has run
    - `createdAt` string, date-time, required: The date and time the knowledge file was created
    - `lastProcessingStartAt` string, date-time, nullable, required: The date and time the last processing of the knowledge file started
    - `lastProcessingEndAt` string, date-time, nullable, required: The date and time the last processing of the knowledge file ended

## Other responses

- `400`: Pagination error

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
