---
title: "List Files"
method: GET
path: "/v1/files?beta=true"
---

# List Files

`GET /v1/files?beta=true`

## Query parameters

- `page` string, nullable — Opaque page cursor returned in a prior list response's `next_page`. Prefixed `page_`.
- `ids[]` string[], nullable — Restrict the result set to Files whose `id` is in this list. At most 100 entries (after de-duplication). Mutually exclusive with `page` and `limit`. When supplied, the response is always a single page (`next_page` is null). IDs that do not resolve to a visible File — including deleted Files — are silently omitted.
- `limit` integer — Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.
- `scope_id` string — Filter by scope ID. Only returns files associated with the specified scope (e.g., a session ID).

## Headers

- `anthropic-beta` string — Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
- `anthropic-version` string — The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
- `x-api-key` string — Your unique API key for authentication. This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.
- `anthropic-workspace-id` string

## Response `200`

Successful Response

- BetaFileListResponse
  - `data` BetaFileMetadataSchema[], required — List of file metadata objects.
    - `created_at` string, date-time, required — RFC 3339 datetime string representing when the file was created.
    - `downloadable` boolean — Whether the file can be downloaded.
    - `expires_at` string, date-time, nullable — RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
    - `filename` string, required — Original filename of the uploaded file.
    - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
    - `mime_type` string, required — MIME type of the file.
    - `scope` BetaFileScope
      - `id` string, required — The ID of the scoping resource (e.g., the session ID).
      - `type` 'session', required — The type of scope (e.g., `"session"`).
    - `size_bytes` integer, required — Size of the file in bytes.
    - `type` 'file', required — Object type. For files, this is always `"file"`.
  - `next_page` string, nullable — Opaque cursor for the next page. Supply as `?page=` to fetch the next page; null when there are no more results.

## Other responses

- `400` — Invalid argument - The client specified an invalid argument
- `401` — Unauthenticated - The request does not have valid authentication credentials
- `403` — Permission denied - The caller does not have permission to execute the specified operation
- `404` — Not found - Some requested entity was not found
- `408` — Deadline exceeded - The deadline expired before the operation could complete
- `409` — Aborted - The operation was aborted due to concurrency issue
- `412` — Failed precondition - Operation was rejected because the system is not in required state
- `413` — Out of range - Operation was attempted past the valid range
- `429` — Resource exhausted - Some resource has been exhausted (rate limiting)
- `431` — Request header fields too large - Request metadata was too large
- `499` — Cancelled - The operation was cancelled by the client
- `500` — Internal - Internal server error
- `501` — Unimplemented - The operation is not implemented or supported
- `503` — Unavailable - The service is currently unavailable
- `504` — Deadline exceeded - Upstream service did not respond in time
- `529` — Overloaded - The service is temporarily overloaded

## Changes

- **2026-09-02** `4789294140a2` — 17 info
  - added the new optional `header` request parameter `anthropic-workspace-id`
  - 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 `403`
  - …13 more
- **2026-08-27** `ef8360d7d2b6` — 5 warning, 4 info
  - deleted the `query` request parameter `after_id`
  - deleted the `query` request parameter `before_id`
  - removed the optional property `first_id` from the response with the `200` status
  - removed the optional property `has_more` from the response with the `200` status
  - …5 more
- **2026-08-18** `d3515f9e9eca` — 1 warning
  - removed the optional property `data/items/expires_at` from the response with the `200` status
- **2026-08-17** `d2b230555b7f` — 1 info
  - added the optional property `data/items/expires_at` to the response with the `200` status
- **2026-04-08** `69486316563e` — 2 info
  - added the new optional `query` request parameter `scope_id`
  - added the optional property `data/items/scope` to the response with the `200` status

[Change history](https://skmtc.dev/anthropics/apis/anthropic-api/changes/v1/files?beta=true/get.md)

---

[API](https://skmtc.dev/anthropics/apis/anthropic-api.md) · [All operations](https://skmtc.dev/anthropics/apis/anthropic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anthropics/apis/anthropic-api/revisions/1bb7c7a0a4a9?raw)
