Anthropic

List files

List the files you have uploaded.

GET /anthropic/v1/files● Supported

Official Anthropic docs ↗

Request 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 supported

    query: 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

NameTypeDescription
dataarray<object>
data[].idstringUnique object identifier. The format and length of IDs may change over time.
data[].created_atstringRFC 3339 datetime string representing when the file was created.
data[].filenamestringOriginal filename of the uploaded file.
data[].mime_typestringMIME type of the file.
data[].size_bytesnumberSize of the file in bytes.
data[].typestringObject type. For files, this is always `"file"`.
data[].downloadablebooleanWhether the file can be downloaded.
data[].expires_atnull | stringRFC 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[].scopenull | objectThe scope of this file, indicating the context in which it was created (e.g., a session).
next_pagenull | string