List files
List the files you have uploaded.
/anthropic/v1/files● SupportedRequest parameters
idsarray可选query: Query param: 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.
Verified to take effect.
scope_idstring可选◐ Partially supportedquery: Query param: Filter by scope ID. Only returns files associated with the specified scope (e.g., a session ID).
Requires anthropic-beta: managed-agents-2026-04-01. Invalid scope_id returns 400; a nonexistent session scope returns 404.
limitnumber可选query: Number of items per page.
Verified to take effect.
pagestring可选query:
Verified to take effect.
after_idstring可选query: Return the page of files immediately after this file id (older files).
Returns the page after this file (older files); cannot be combined with before_id or page.
before_idstring可选query: Return the page of files immediately before this file id (newer files).
Returns the page before this file (newer files); cannot be combined with after_id or page.
Returns
200
Newest first. Paginate with after_id / before_id and limit (sending both returns 400), or with the page cursor (next_page); use only one of the three. Responses contain data, has_more, first_id, last_id and next_page. ids (up to 100 distinct IDs) is mutually exclusive with page, after_id, before_id and limit. scope_id requires the anthropic-beta: managed-agents-2026-04-01 header; a missing header returns 400 and a nonexistent session scope returns 404. anthropic-workspace-id returns 400.
Errors follow the Anthropic format — see error codes
Response
HTTP 200
Files listed
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique object identifier. The format and length of IDs may change over time. |
| data[].created_at | string | RFC 3339 datetime string representing when the file was created. |
| data[].filename | string | Original filename of the uploaded file. |
| data[].mime_type | string | MIME type of the file. |
| data[].size_bytes | number | Size of the file in bytes. |
| data[].type | string | Object type. For files, this is always `"file"`. |
| data[].downloadable | boolean | Whether the file can be downloaded. |
| data[].expires_at | null | string | 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. |
| data[].scope | null | object | The scope of this file, indicating the context in which it was created (e.g., a session). |
| next_page | null | string |