> ## 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.

# Trashed files resources

Files that were deleted and are in the trash.

## Trashed File

Represents a trashed file.

<Accordion title="Attributes and example">
  | Property              | Type                                                      | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | --------------------- | --------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `id`                  | `string`                                                  | Yes      | The unique identifier that represent a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`.                                                                                                                                                                                                                                                                                                                                                    |
  | `etag`                | `string`                                                  | No       | The HTTP `etag` of this file. This can be used within some API endpoints in the `If-Match` and `If-None-Match` headers to only perform changes on the file if (no) changes have happened. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                            |
  | `type`                | `enum<string>`                                            | Yes      | The value will always be `file`. Available options: `file`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `sequence_id`         | `string`                                                  | Yes      | A numeric identifier that represents the most recent user event that has been applied to this item. This can be used in combination with the `GET /events`-endpoint to filter out user events that would have occurred before this identifier was read. An example would be where a Box Drive-like application would fetch an item via the API, and then listen to incoming user events for changes to the item. The application would ignore any user events where the `sequence_id` in the event is smaller than or equal to the `sequence_id` in the originally fetched resource. Can be `null`. |
  | `name`                | `string`                                                  | No       | The name of the file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `sha1`                | `string`                                                  | Yes      | The SHA1 hash of the file. This can be used to compare the contents of a file on Box with a local file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | `file_version`        | `File version (Mini)`                                     | No       | The information about the current version of the file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | `description`         | `string`                                                  | Yes      | The optional description of this file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | `size`                | `integer`                                                 | Yes      | The file size in bytes. Be careful parsing this integer as it can get very large and cause an integer overflow.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | `path_collection`     | `object`                                                  | Yes      | A list of parent folders for an item in the trash.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | `created_at`          | `string`                                                  | Yes      | The date and time when the file was created on Box.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | `modified_at`         | `string`                                                  | Yes      | The date and time when the file was last updated on Box.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
  | `trashed_at`          | `string`                                                  | No       | The time at which this file was put in the trash. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
  | `purged_at`           | `string`                                                  | No       | The time at which this file is expected to be purged from the trash. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | `content_created_at`  | `string`                                                  | No       | The date and time at which this file was originally created, which might be before it was uploaded to Box. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | `content_modified_at` | `string`                                                  | No       | The date and time at which this file was last updated, which might be before it was uploaded to Box. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | `created_by`          | [User (Mini)](/reference/users-resources#user-mini)       | No       | The user who created this file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | `modified_by`         | [User (Mini)](/reference/users-resources#user-mini)       | Yes      | The user who last modified this file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `owned_by`            | [User (Mini)](/reference/users-resources#user-mini)       | Yes      | The user who owns this file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  | `shared_link`         | `string`                                                  | No       | The shared link for this file. This will be `null` if a file has been trashed, since the link will no longer be active. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | `parent`              | [Folder (Mini)](/reference/folders-resources#folder-mini) | No       | The folder that this file is located within. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `item_status`         | `enum<string>`                                            | Yes      | Defines if this item has been deleted or not. - `active` when the item has is not in the trash - `trashed` when the item has been moved to the trash but not deleted - `deleted` when the item has been permanently deleted. Available options: `active`, `trashed`, `deleted`.                                                                                                                                                                                                                                                                                                                     |

  ```json Example theme={null}
  {
    "id": "123456789",
    "etag": "1",
    "type": "file",
    "sequence_id": "3",
    "name": "Contract.pdf",
    "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
    "file_version": {
      "id": "12345",
      "type": "file_version",
      "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
    },
    "description": "Contract for Q1 renewal",
    "size": 629644,
    "path_collection": {
      "total_count": 1,
      "entries": [
        {
          "type": "folder",
          "id": "123456789",
          "sequence_id": null,
          "etag": null,
          "name": "Trash"
        }
      ]
    },
    "created_at": "2012-12-12T10:53:43-08:00",
    "modified_at": "2012-12-12T10:53:43-08:00",
    "trashed_at": "2012-12-12T10:53:43-08:00",
    "purged_at": "2012-12-12T10:53:43-08:00",
    "content_created_at": "2012-12-12T10:53:43-08:00",
    "content_modified_at": "2012-12-12T10:53:43-08:00",
    "created_by": {
      "id": "11446498",
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "modified_by": {
      "id": "11446498",
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "owned_by": {
      "id": "11446498",
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "shared_link": null,
    "parent": {
      "id": "12345",
      "etag": "1",
      "type": "folder",
      "sequence_id": "3",
      "name": "Contracts"
    },
    "item_status": "trashed"
  }
  ```
</Accordion>

## Trashed File (Restored)

Represents a file restored from the trash.

<Accordion title="Attributes and example">
  | Property              | Type                                                      | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | --------------------- | --------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `id`                  | `string`                                                  | Yes      | The unique identifier that represent a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`.                                                                                                                                                                                                                                                                                                                                                    |
  | `etag`                | `string`                                                  | No       | The HTTP `etag` of this file. This can be used within some API endpoints in the `If-Match` and `If-None-Match` headers to only perform changes on the file if (no) changes have happened. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                            |
  | `type`                | `enum<string>`                                            | Yes      | The value will always be `file`. Available options: `file`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `sequence_id`         | `string`                                                  | Yes      | A numeric identifier that represents the most recent user event that has been applied to this item. This can be used in combination with the `GET /events`-endpoint to filter out user events that would have occurred before this identifier was read. An example would be where a Box Drive-like application would fetch an item via the API, and then listen to incoming user events for changes to the item. The application would ignore any user events where the `sequence_id` in the event is smaller than or equal to the `sequence_id` in the originally fetched resource. Can be `null`. |
  | `name`                | `string`                                                  | No       | The name of the file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `sha1`                | `string`                                                  | Yes      | The SHA1 hash of the file. This can be used to compare the contents of a file on Box with a local file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | `file_version`        | `File version (Mini)`                                     | No       | The information about the current version of the file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | `description`         | `string`                                                  | Yes      | The optional description of this file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | `size`                | `integer`                                                 | Yes      | The file size in bytes. Be careful parsing this integer as it can get very large and cause an integer overflow.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | `path_collection`     | `object`                                                  | Yes      | A list of parent folders for an item.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `created_at`          | `string`                                                  | Yes      | The date and time when the file was created on Box.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | `modified_at`         | `string`                                                  | Yes      | The date and time when the file was last updated on Box.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
  | `trashed_at`          | `string`                                                  | No       | The time at which this file was put in the trash - becomes `null` after restore. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | `purged_at`           | `string`                                                  | No       | The time at which this file is expected to be purged from the trash - becomes `null` after restore. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | `content_created_at`  | `string`                                                  | No       | The date and time at which this file was originally created, which might be before it was uploaded to Box. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | `content_modified_at` | `string`                                                  | No       | The date and time at which this file was last updated, which might be before it was uploaded to Box. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | `created_by`          | [User (Mini)](/reference/users-resources#user-mini)       | No       | The user who created this file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | `modified_by`         | [User (Mini)](/reference/users-resources#user-mini)       | Yes      | The user who last modified this file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
  | `owned_by`            | [User (Mini)](/reference/users-resources#user-mini)       | Yes      | The user who owns this file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  | `shared_link`         | `string`                                                  | No       | The shared link for this file. This will be `null` if a file had been trashed, even though the original shared link does become active again. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  | `parent`              | [Folder (Mini)](/reference/folders-resources#folder-mini) | No       | The folder that this file is located within. Can be `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | `item_status`         | `enum<string>`                                            | Yes      | Defines if this item has been deleted or not. - `active` when the item has is not in the trash - `trashed` when the item has been moved to the trash but not deleted - `deleted` when the item has been permanently deleted. Available options: `active`, `trashed`, `deleted`.                                                                                                                                                                                                                                                                                                                     |

  ```json Example theme={null}
  {
    "id": "123456789",
    "etag": "1",
    "type": "file",
    "sequence_id": "3",
    "name": "Contract.pdf",
    "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
    "file_version": {
      "id": "12345",
      "type": "file_version",
      "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
    },
    "description": "Contract for Q1 renewal",
    "size": 629644,
    "path_collection": {
      "total_count": 1,
      "entries": [
        {
          "id": "12345",
          "etag": "1",
          "type": "folder",
          "sequence_id": "3",
          "name": "Contracts"
        }
      ]
    },
    "created_at": "2012-12-12T10:53:43-08:00",
    "modified_at": "2012-12-12T10:53:43-08:00",
    "trashed_at": null,
    "purged_at": null,
    "content_created_at": "2012-12-12T10:53:43-08:00",
    "content_modified_at": "2012-12-12T10:53:43-08:00",
    "created_by": {
      "id": "11446498",
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "modified_by": {
      "id": "11446498",
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "owned_by": {
      "id": "11446498",
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "shared_link": null,
    "parent": {
      "id": "12345",
      "etag": "1",
      "type": "folder",
      "sequence_id": "3",
      "name": "Contracts"
    },
    "item_status": "active"
  }
  ```
</Accordion>
