---
title: "List files in a userdata directory"
method: GET
path: "/api/userdata"
tags: ["userdata"]
---

# List files in a userdata directory

`GET /api/userdata`

Lists files in the authenticated user's data directory. Returns either filename strings or full objects depending on the `full_info` query parameter.

## Query parameters

- `dir` string, required
- `recurse` boolean
- `full_info` boolean
- `split` boolean

## Headers

- `Comfy-User` string

## Response `200`

File listing

- GetUserDataResponseFullFile[] — [cloud-only] List of user data file entries (each with path, size, and modification time) returned when full_info=true.
  - `path` string — File name or path relative to the user directory
  - `created` number — Unix timestamp of file creation
  - `size` integer — File size in bytes
  - `modified` integer — Unix timestamp of last modification in milliseconds

## Other responses

- `400` — Bad request (e.g., invalid filename).
- `401` — Unauthorized.
- `404` — Directory not found
- `500` — General error

## Changes

- **2026-05-22** `c4db9e1283df` — 1 breaking, 1 info
  - the response's body type/format changed from ``/`` to `array`/`` for status `200`
  - removed `subschema #1, subschema #2, subschema #3` from the response body `oneOf` list for the response status `200`
- **2026-05-22** `09a5075587c8` — 4 info
  - api operation id `listUserdata` removed and replaced with `getUserdata`
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - added the non-success response with the status `500`
- **2026-04-24** `a66055fa384e` — 7 breaking, 7 info
  - the `query` request parameter `dir` became required
  - for the `query` request parameter `full_info`, default value `false` was removed
  - for the `query` request parameter `recurse`, default value `false` was removed
  - for the `query` request parameter `split`, default value `false` was removed
  - …10 more

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/userdata/get.md)

---

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