---
title: "Create upload session for existing file"
method: POST
path: "/files/{file_id}/upload_sessions"
tags: ["Uploads (Chunked)"]
---

# Create upload session for existing file

`POST /files/{file_id}/upload_sessions`

Creates an upload session for an existing file.

## Path parameters

- `file_id` string, required

## Request body

- object
  - `file_size` integer, required — The total number of bytes of the file to be uploaded.
  - `file_name` string — The optional new name of new file.

## Response `201`

Returns a new upload session.

- UploadSession — An upload session for chunk uploading a file.
  - `id` string — The unique identifier for this session.
  - `type` 'upload_session' — The value will always be `upload_session`.
  - `session_expires_at` string, date-time — The date and time when this session expires.
  - `part_size` integer — The size in bytes that must be used for all parts of of the upload. Only the last part is allowed to be of a smaller size.
  - `total_parts` integer — The total number of parts expected in this upload session, as determined by the file size and part size.
  - `num_parts_processed` integer — The number of parts that have been uploaded and processed by the server. This starts at `0`. When committing a file files, inspecting this property can provide insight if all parts have been uploaded correctly.
  - `session_endpoints` object — A list of endpoints for this session.
    - `upload_part` string — The URL to upload parts to.
    - `commit` string — The URL used to commit the file.
    - `abort` string — The URL for used to abort the session.
    - `list_parts` string — The URL users to list all parts.
    - `status` string — The URL used to get the status of the upload.
    - `log_event` string — The URL used to get the upload log from.

## Other responses

- `409` — Returns an error if the file already exists, or if the account has run out of disk space.
- `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/versions/ba8f087e1a4d/schema)
