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

# Uploads (Chunked) resources

The chunked upload endpoints support files from 20MB in size and allow an application to upload the file in parts, allowing for more control to catch any errors and retry parts individually.

## Upload part

The representation of an upload session chunk.

> [accordion] Attributes and example
>
> | Property | Type | Required | Description |
> | - | - | - | - |
> | `part_id` | `string` | No | The unique ID of the chunk. |
> | `offset` | `integer` | No | The offset of the chunk within the file in bytes. The lower bound of the position of the chunk within the file. |
> | `size` | `integer` | No | The size of the chunk in bytes. |
> | `sha1` | `string` | No | The SHA1 hash of the chunk. |
> | `sha512` | `string` | No | The `SHA-512` hash of the chunk, as a hex string of 128 lower case characters. |
>
> ```json Example theme={null}
> {
>   "part_id": "6F2D3486",
>   "offset": 16777216,
>   "size": 3222784,
>   "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
>   "sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383"
> }
> ```

## Upload part (Mini)

The basic representation of an upload session chunk.

> [accordion] Attributes and example
>
> | Property | Type | Required | Description |
> | - | - | - | - |
> | `part_id` | `string` | No | The unique ID of the chunk. |
> | `offset` | `integer` | No | The offset of the chunk within the file in bytes. The lower bound of the position of the chunk within the file. |
> | `size` | `integer` | No | The size of the chunk in bytes. |
>
> ```json Example theme={null}
> {
>   "part_id": "6F2D3486",
>   "offset": 16777216,
>   "size": 3222784
> }
> ```

## Upload part plan

Represents a planned upload part with `SHA-512` hash for upload session planning.

> [accordion] Attributes and example
>
> | Property | Type | Required | Description |
> | - | - | - | - |
> | `offset` | `integer` | Yes | The offset of the chunk within the file in bytes. The lower bound of the position of the chunk within the file. |
> | `size` | `integer` | Yes | The size of the chunk in bytes. |
> | `sha512` | `string` | Yes | The `SHA-512` hash of the chunk, as a hex string of 128 lower case characters. |
>
> ```json Example theme={null}
> {
>   "offset": 0,
>   "size": 8388608,
>   "sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383"
> }
> ```

## Upload part plan hit

Represents a planned upload part that already exists on the server (cache hit).

> [accordion] Attributes and example
>
> | Property | Type | Required | Description |
> | - | - | - | - |
> | `offset` | `integer` | Yes | The offset of the chunk within the file in bytes. The lower bound of the position of the chunk within the file. |
> | `size` | `integer` | Yes | The size of the chunk in bytes. |
> | `sha512` | `string` | Yes | The `SHA-512` hash of the chunk, as a hex string of 128 lower case characters. |
> | `part_id` | `string` | Yes | The unique ID of the chunk. |
>
> ```json Example theme={null}
> {
>   "offset": 0,
>   "size": 8388608,
>   "sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383",
>   "part_id": "BFDF5379"
> }
> ```

## Upload parts

A list of uploaded chunks for an upload session.

> [accordion] Attributes and example
>
> | Property | Type | Required | Description |
> | - | - | - | - |
> | `total_count` | `integer` | No | 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` | 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. |
> | `offset` | `integer` | No | 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` | array of `object` | No | 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. |
> | `entries` | array of [Upload part](#upload-part) | No | A list of uploaded chunks for an upload session. |
>
> ```json Example theme={null}
> {
>   "total_count": 5000,
>   "limit": 1000,
>   "offset": 2000,
>   "order": [
>     {
>       "by": "type",
>       "direction": "ASC"
>     }
>   ],
>   "entries": [
>     {
>       "part_id": "6F2D3486",
>       "offset": 16777216,
>       "size": 3222784,
>       "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
>       "sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383"
>     }
>   ]
> }
> ```

## Upload session

An upload session for chunk uploading a file.

> [accordion] Attributes and example
>
> | Property | Type | Required | Description |
> | - | - | - | - |
> | `id` | `string` | No | The unique identifier for this session. |
> | `type` | `enum<string>` | No | The value will always be `upload_session`. Available options: `upload_session`. |
> | `session_expires_at` | `string` | No | The date and time when this session expires. |
> | `part_size` | `integer` | No | The size in bytes that must be used for all parts of the upload. Only the last part is allowed to be of a smaller size. |
> | `total_parts` | `integer` | No | The total number of parts expected in this upload session, as determined by the file size and part size. |
> | `num_parts_processed` | `integer` | No | The number of parts that have been uploaded and processed by the server. This starts at `0`. When committing a file, inspecting this property can provide insight if all parts have been uploaded correctly. |
> | `session_endpoints` | `object` | No | A list of endpoints for a chunked upload session. |
>
> ```json Example theme={null}
> {
>   "id": "F971964745A5CD0C001BBE4E58196BFD",
>   "type": "upload_session",
>   "session_expires_at": "2012-12-12T10:53:43-08:00",
>   "part_size": 1024,
>   "total_parts": 1000,
>   "num_parts_processed": 455,
>   "session_endpoints": {
>     "plan": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/plan",
>     "upload_part": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD",
>     "commit": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/commit",
>     "abort": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD",
>     "list_parts": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/parts",
>     "status": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD",
>     "log_event": "https://{box-upload-server}/api/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD/log"
>   }
> }
> ```

## Upload session plan request

Request body for planning an upload session. This allows checking which parts already exist on the server before uploading.

> [accordion] Attributes and example
>
> | Property | Type | Required | Description |
> | - | - | - | - |
> | `parts` | array of [Upload part plan](#upload-part-plan) | Yes | The list of parts to check for existence. |
>
> ```json Example theme={null}
> {
>   "parts": [
>     {
>       "offset": 0,
>       "size": 8388608,
>       "sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383"
>     },
>     {
>       "offset": 8388608,
>       "size": 8388608,
>       "sha512": "588fde2156e1d8b23c9ca88ed3bed7bd1270e6ba0bb5b97b294ea1498952d7fd505e406097638514df92e9c5fecd0e73bd872499fcd7ea18eeb18567d0e09020"
>     }
>   ]
> }
> ```

## Upload session plan response

Response from planning an upload session. Contains information about which parts already exist (hits) and which need to be uploaded (misses).

> [accordion] Attributes and example
>
> | Property | Type | Required | Description |
> | - | - | - | - |
> | `upload_session_id` | `string` | Yes | The unique identifier for this upload session. |
> | `hits` | array of [Upload part plan hit](#upload-part-plan-hit) | Yes | Parts that already exist on the server and do not need to be uploaded again. |
> | `misses` | array of [Upload part plan](#upload-part-plan) | Yes | Parts that do not exist on the server and need to be uploaded. |
>
> ```json Example theme={null}
> {
>   "upload_session_id": "F971964745A5CD0C001BBE4E58196BFD",
>   "hits": [
>     {
>       "offset": 0,
>       "size": 8388608,
>       "sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383",
>       "part_id": "BFDF5379"
>     }
>   ],
>   "misses": [
>     {
>       "offset": 8388608,
>       "size": 8388608,
>       "sha512": "588fde2156e1d8b23c9ca88ed3bed7bd1270e6ba0bb5b97b294ea1498952d7fd505e406097638514df92e9c5fecd0e73bd872499fcd7ea18eeb18567d0e09020"
>     }
>   ]
> }
> ```

## Uploaded part

A chunk of a file uploaded as part of an upload session, as returned by some endpoints.

> [accordion] Attributes and example
>
> | Property | Type | Required | Description |
> | - | - | - | - |
> | `part` | [Upload part](#upload-part) | No | |
>
> ```json Example theme={null}
> {
>   "part": {
>     "part_id": "6F2D3486",
>     "offset": 16777216,
>     "size": 3222784,
>     "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
>     "sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383"
>   }
> }
> ```
