---
title: "List Files"
method: GET
path: "/api/v1/files"
tags: ["files"]
---

# List Files

`GET /api/v1/files`

List files.

- To list files within a workspace, the `prefix` (query parameter) must start with `workspaces/{workspace_id}/`
- Cannot list files across multiple workspaces, i.e., if the `prefix` does not start with `workspaces/{workspace_id}/`, it will return an empty list.

## Query parameters

- `prefix` string — Prefix (path) to filter the files by. For folders it should end with `/`. Note that it is currently not possible to list files across workspaces but only within one workspace, i.e., which means that the prefix should start with `workspaces/{workspace_id}/`.
- `delimiter` string, nullable — Delimiter to group keys, e.g., `/` to group by folders, i.e., get files of the root folder or the folder identified by the prefix. If not provided, no folders are included in the response.
- `limit` integer — Maximum number of files to return per page
- `continuation_token` string, nullable — Continuation token to get the next page of results (cursor-based pagination)
- `expand` string[], nullable — Expand the response with the signed URL to the file

## Response `200`

Files listed successfully

- FilesListResponseDto
  - `data` union[], required
    - union
      - FileDto
        - `type` 'file'
        - `name` string, required
        - `path` string, required — Path to the file starting
        - `url` string, nullable — Signed URL to the file with a 1 hour TTL
        - `size` integer, required — Size of the file in bytes
        - `lastModified` string, date-time, required
      - FolderDto
        - `type` 'folder'
        - `name` string, required
        - `path` string, required
  - `nextContinuationToken` string, nullable

## Other responses

- `401` — Unauthorized
- `422` — Validation Error
- `500` — Internal server error

---

[API](https://skmtc.dev/askui/apis/askui-workspaces-api.md) · [All operations](https://skmtc.dev/askui/apis/askui-workspaces-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/askui/askui-workspaces-api/revisions/b796c74292ac/schema)
