List Files
api/beta/files/list
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/files/list Changed · +24 / -19 lines
# List Files ## Query parameters ## Headers ## Returns ## Example ### Response (200) ## List Files ### Query Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: List Files -url: https://platform.claude.com/docs/en/api/beta/files/list ---- +# List Files -## List Files +**GET** `/v1/files` -**get** `/v1/files` - List Files -### Query Parameters +## Query parameters - `after_id: optional string`
Defaults to `20`. Ranges from `1` to `1000`. + default: 20, maximum: 1000, minimum: 1 + - `scope_id: optional string` Filter by scope ID. Only returns files associated with the specified scope (e.g., a session ID). -### Header Parameters +## Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Returns +## Returns - `data: array of BetaFileMetadata`
RFC 3339 datetime string representing when the file was created. + format: date-time + - `filename: string` Original filename of the uploaded file. + maxLength: 500, minLength: 1 + - `mime_type: string` MIME type of the file. + maxLength: 255, minLength: 1 + - `size_bytes: number` Size of the file in bytes. + minimum: 0 + - `type: "file"` Object type.
For files, this is always `"file"`. - - `"file"` - - `downloadable: optional boolean` Whether the file can be downloaded. + default: false + - `scope: optional BetaFileScope or null` The scope of this file, indicating the context in which it was created (e.g., a session).
The type of scope (e.g., `"session"`). - - `"session"` - - `first_id: optional string or null` ID of the first file in this page of results.
Whether there are more results available. + default: false + - `last_id: optional string or null` ID of the last file in this page of results. -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/files \ -H 'anthropic-version: 2023-06-01' \ -H 'anthropic-beta: files-api-2025-04-14' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +### Response (200) ```json {