---
title: "Read a userdata file"
method: GET
path: "/api/userdata/{file}"
tags: ["userdata"]
---

# Read a userdata file

`GET /api/userdata/{file}`

Reads the contents of a file from the authenticated user's data directory.

## Path parameters

- `file` string, required

## Headers

- `Comfy-User` string

## Response `200`

File content

## Other responses

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

## Changes

- **2026-05-22** `09a5075587c8` — 3 info
  - 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` — 1 breaking, 6 info
  - removed the media type `text/plain` for the response with the status `404`
  - api tag `userdata` added
  - api tag `user` removed
  - added the new optional `header` request parameter `Comfy-User`
  - …3 more

[Change history](https://skmtc.dev/comfy-org/apis/comfyui-api/changes/api/userdata/:file/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/09a5075587c8/schema)
