---
title: "List user's files with cursor-based pagination"
method: GET
path: "/api/files"
tags: ["Files"]
---

# List user's files with cursor-based pagination

`GET /api/files`

# Errors
Returns an error if database operations fail.

## Query parameters

- `offset` string, uuid, nullable
- `limit` integer, nullable

## Response `200`

User files retrieved with pagination support

- UserFileInfo[] — Collection of user files with metadata
  - `createdAt` string, date-time, nullable — File upload timestamp
  - `fileHash` string, required — SHA-256 hash of the file
  - `fileSize` integer, required — Size of the file in bytes
  - `filename` string, required — Current filename
  - `id` string, uuid, required — File's unique identifier
  - `metadata` Value — Flexible JSON value that can be an object, array, string, number, boolean, or null
  - `mimeType` string, required — MIME type of the file
  - `originalFilename` string, required — Original filename as uploaded by user
  - `status` 'uploaded' | 'processing' | 'processed' | 'failed' | 'deleted', required — File processing status for user uploaded files
  - `updatedAt` string, date-time, nullable — File last update timestamp
  - `userId` string, uuid, required — ID of the user who owns this file

## Other responses

- `401` — Authentication required to access files
- `500` — Database error while retrieving user files

## Changes

- **2025-09-24** `ad76e6bdf403` — 2 info
  - the endpoint scheme security `bearerAuth AND cookieAuth` was added to the API
  - the endpoint scheme security `cookieAuth` was removed from the API
- **2025-09-22** `861532a21ad9` — 5 breaking, 2 warning, 7 info
  - removed the required property `items/file_hash` from the response with the `200` status
  - removed the required property `items/file_size` from the response with the `200` status
  - removed the required property `items/mime_type` from the response with the `200` status
  - removed the required property `items/original_filename` from the response with the `200` status
  - …10 more
- **2025-09-22** `93deff514935` — 1 info
  - endpoint added
- **2025-09-01** `a2488be8a6e4` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/patroninc/apis/patron-api/changes/api/files/get.md)

---

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