> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# File version retentions resources

A retention policy blocks permanent deletion of content for a specified amount of time. A file version retention is a record for a retained file.

## File version retention

A retention policy blocks permanent deletion of content for a specified amount of time. Admins can apply policies to specified folders, or an entire enterprise. A file version retention is a record for a retained file version. To use this feature, you must have the manage retention policies scope enabled for your API key in your application management console. **Note**: File retention API is now **deprecated**. To get information about files and file versions under retention, see [files under retention](/reference/get-retention-policy-assignments-id-files-under-retention) or [file versions under retention](/reference/get-retention-policy-assignments-id-file-versions-under-retention) endpoints.

<Accordion title="Attributes and example">
  | Property                   | Type                                                                                     | Required | Description                                                                                                                       |
  | -------------------------- | ---------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
  | `id`                       | `string`                                                                                 | No       | The unique identifier for this file version retention.                                                                            |
  | `type`                     | `enum<string>`                                                                           | No       | The value will always be `file_version_retention`. Available options: `file_version_retention`.                                   |
  | `file_version`             | `File version (Mini)`                                                                    | No       | The file version this file version retention was applied to.                                                                      |
  | `file`                     | [File (Mini)](/reference/files-resources#file-mini)                                      | No       | The file this file version retention was applied to.                                                                              |
  | `applied_at`               | `string`                                                                                 | No       | When this file version retention object was created.                                                                              |
  | `disposition_at`           | `string`                                                                                 | No       | When the retention expires on this file version retention.                                                                        |
  | `winning_retention_policy` | [Retention policy (Mini)](/reference/retention-policies-resources#retention-policy-mini) | No       | The winning retention policy applied to this file version retention. A file version can have multiple retention policies applied. |

  ```json Example theme={null}
  {
    "id": "11446498",
    "type": "file_version_retention",
    "file_version": {
      "id": "12345",
      "type": "file_version",
      "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
    },
    "file": {
      "id": "12345",
      "etag": "1",
      "type": "file",
      "sequence_id": "3",
      "name": "Contract.pdf",
      "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
      "file_version": {
        "id": "12345",
        "type": "file_version",
        "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
      }
    },
    "applied_at": "2012-12-12T10:53:43-08:00",
    "disposition_at": "2012-12-12T10:53:43-08:00",
    "winning_retention_policy": {
      "id": "12345",
      "type": "retention_policy",
      "policy_name": "Some Policy Name",
      "retention_length": "365",
      "disposition_action": "permanently_delete",
      "max_extension_length": "365"
    }
  }
  ```
</Accordion>

## File version retentions

A list of file version retentions. **Note**: File retention API is now **deprecated**. To get information about files and file versions under retention, see [files under retention](/reference/get-retention-policy-assignments-id-files-under-retention) or [file versions under retention](/reference/get-retention-policy-assignments-id-file-versions-under-retention) endpoints.

<Accordion title="Attributes and example">
  | Property      | Type                                                       | Required | Description                                                                                                                                                                            |
  | ------------- | ---------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `limit`       | `integer`                                                  | No       | 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. |
  | `next_marker` | `string`                                                   | No       | The marker for the start of the next page of results. Can be `null`.                                                                                                                   |
  | `prev_marker` | `string`                                                   | No       | The marker for the start of the previous page of results. Can be `null`.                                                                                                               |
  | `entries`     | array of [File version retention](#file-version-retention) | No       | A list of file version retentions.                                                                                                                                                     |

  ```json Example theme={null}
  {
    "limit": 1000,
    "next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii",
    "prev_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih",
    "entries": [
      {
        "id": "11446498",
        "type": "file_version_retention",
        "file_version": {
          "id": "12345",
          "type": "file_version",
          "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
        },
        "file": {
          "id": "12345",
          "etag": "1",
          "type": "file",
          "sequence_id": "3",
          "name": "Contract.pdf",
          "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
          "file_version": {
            "id": "12345",
            "type": "file_version",
            "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
          }
        },
        "applied_at": "2012-12-12T10:53:43-08:00",
        "disposition_at": "2012-12-12T10:53:43-08:00",
        "winning_retention_policy": {
          "id": "12345",
          "type": "retention_policy",
          "policy_name": "Some Policy Name",
          "retention_length": "365",
          "disposition_action": "permanently_delete",
          "max_extension_length": "365"
        }
      }
    ]
  }
  ```
</Accordion>
