---
title: "List uploaded files for a consultation"
method: GET
path: "/workspaces/{workspaceId}/consultations/{consultationId}/uploaded-files"
tags: ["uploaded-files"]
---

# List uploaded files for a consultation

`GET /workspaces/{workspaceId}/consultations/{consultationId}/uploaded-files`

## Request

- Base URL: `https://vetnio.com/api/v2`
- URL: `https://vetnio.com/api/v2/workspaces/{workspaceId}/consultations/{consultationId}/uploaded-files`
- Auth: HTTP bearer

Returns every file attached to a consultation, newest first (by `createdAt`). Each file carries its current analysis status and, when extraction failed, the error message. Use this endpoint to render a file list or to poll for the `analyzing` → `analyzed` transition after `finalizeUpload`. Files whose upload was initialized but never finalized are listed with status `uploaded`. Any member of the workspace can list the files.

## Path parameters

- `workspaceId` string, required: Opaque identifier of the Vetnio workspace (veterinary clinic) that owns the resource. Scopes every request — callers can only access files under workspaces they are a member of.
- `consultationId` string, required: Identifier of the consultation (a single veterinary visit) the file is attached to. The consultation must belong to the same workspace as the authenticated caller.

## Response `200`

List of files attached to the consultation. An empty array means no files have been uploaded yet.

- UploadedFile[]
  - `fileName` string, required: Stable internal identifier for the file — a server-generated UUID returned by `initUpload`. Used in every subsequent endpoint (finalize, download, delete). Not intended for display; use `originalFileName` for that.
  - `originalFileName` string, required: The file name as it was on the uploader's device. Shown to users in the UI. May contain characters that are unsafe for object-storage keys, which is why it is never used as a storage identifier.
  - `mimeType` string, required: MIME type as recorded at upload time.
  - `sizeBytes` integer, required: Exact size of the file in bytes. `finalizeUpload` compares it with the size of the uploaded object and returns `412` until they match, so it must equal the number of bytes you `PUT`. No maximum is enforced by the API.
  - `status` 'uploaded' | 'analyzing' | 'analyzed' | 'failed', required: Lifecycle state of the file: - `uploaded` — the upload slot was reserved by `initUpload`; the bytes may not have been sent yet and no extraction has started. Call `finalizeUpload` after the `PUT`. - `analyzing` — extraction is running in the background (usually seconds; longer for large PDFs). - `analyzed` — extraction succeeded; the extracted text is available to document generation and chat features. - `failed` — extraction errored; inspect `errorMessage`. Calling `finalizeUpload` again retries the extraction.
  - `createdAt` string, required: When the upload was initialized, as an ISO-8601 UTC timestamp. Does not reflect when the bytes arrived or when analysis completed.
  - `errorMessage` string, nullable, required: Human-readable error from the content extractor. Populated only when `status` is `failed`, otherwise `null`.

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `404`: Not found
- `500`: Internal server error

---

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