---
title: "List all file versions"
method: GET
path: "/files/{file_id}/versions"
tags: ["File versions"]
---

# List all file versions

`GET /files/{file_id}/versions`

Retrieve a list of the past versions for a file.

Versions are only tracked by Box users with premium accounts. To fetch the ID
of the current version of a file, use the `GET /file/:id` API.

## Path parameters

- `file_id` string, required

## Query parameters

- `fields` string[]
- `limit` integer
- `offset` integer

## Response `200`

Returns an array of past versions for this file.

- FileVersions — The part of an API response that describes pagination.
  - `total_count` integer — One greater than the offset of the last entry in the entire collection. The total number of entries in the collection may be less than `total_count`. This field is only returned for calls that use offset-based pagination. For marker-based paginated APIs, this field will be omitted.
  - `limit` integer — The limit that was used for these entries. This will be the same as the `limit` query parameter unless that value exceeded the maximum value allowed. The maximum value varies by API.
  - `offset` integer — The 0-based offset of the first entry in this set. This will be the same as the `offset` query parameter. This field is only returned for calls that use offset-based pagination. For marker-based paginated APIs, this field will be omitted.
  - `order` object[] — The order by which items are returned. This field is only returned for calls that use offset-based pagination. For marker-based paginated APIs, this field will be omitted.
    - `by` string — The field to order by.
    - `direction` 'ASC' | 'DESC' — The direction to order by, either ascending or descending.
  - `entries` FileVersionFull[] — A list of file versions.
    - `id` string, required — The unique identifier that represent a file version.
    - `type` 'file_version', required — The value will always be `file_version`.
    - `sha1` string — The SHA1 hash of this version of the file.
    - `name` string — The name of the file version.
    - `size` integer — Size of the file version in bytes.
    - `created_at` string, date-time — When the file version object was created.
    - `modified_at` string, date-time — When the file version object was last updated.
    - `modified_by` object — The user who last updated the file version.
      - `id` string, required — The unique identifier for this user.
      - `type` 'user', required — The value will always be `user`.
      - `name` string — The display name of this user.
      - `login` string, email — The primary email address of this user.
    - `trashed_at` string, date-time, nullable — When the file version object was trashed.
    - `trashed_by` object — The user who trashed the file version.
      - `id` string, required — The unique identifier for this user.
      - `type` 'user', required — The value will always be `user`.
      - `name` string — The display name of this user.
      - `login` string, email — The primary email address of this user.
    - `restored_at` string, date-time, nullable — When the file version was restored from the trash.
    - `restored_by` object — The user who restored the file version from the trash.
      - `id` string, required — The unique identifier for this user.
      - `type` 'user', required — The value will always be `user`.
      - `name` string — The display name of this user.
      - `login` string, email — The primary email address of this user.
    - `purged_at` string, date-time, nullable — When the file version object will be permanently deleted.
    - `uploader_display_name` string — The display name of the user that uploaded the file. In most cases this is the name of the user logged in at the time of the upload. If the file was uploaded using a File Request form that requires the user to provide an email address, this field is populated with that email address. If an email address was not required in the File Request form, this field is set to return a value of `File Request`. In all other anonymous cases where no email was provided this field will default to a value of `Someone`.
    - `version_number` string — The version number of this file version.

## Other responses

- `default` — An unexpected client error.

---

[API](https://skmtc.net/box/apis/platform-api.md) · [All operations](https://skmtc.net/box/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/box/platform-api/revisions/ba8f087e1a4d/schema)
