Box Developer Documentation
Latest version

Remove upload session

delete
https://{box-upload-server}/api/2.0
/files/upload_sessions/:upload_session_id

This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

Abort an upload session and discard all data uploaded.

This cannot be reversed.

The actual endpoint URL is returned by the Create upload session and Get upload session endpoints.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
D5E3F7A

The ID of the upload session.

Response

none

A blank response is returned if the session was successfully aborted.

application/jsonClient error

An unexpected client error.

delete
Remove upload session
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

Learn more about Box SDK versionig strategy.


cURL
curl -i -X DELETE "https://upload.box.com/2.0/files/upload_sessions/F971964745A5CD0C001BBE4E58196BFD" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.chunkedUploads.deleteFileUploadSessionById(uploadSessionId);
Python v10
client.chunked_uploads.delete_file_upload_session_by_id(upload_session_id)
.NET v10
await client.ChunkedUploads.DeleteFileUploadSessionByIdAsync(uploadSessionId: uploadSessionId);
Swift v10
try await client.chunkedUploads.deleteFileUploadSessionById(uploadSessionId: uploadSessionId)
Java v10
client.getChunkedUploads().deleteFileUploadSessionById(uploadSessionId)
Java v4
session.abort();
Python v3
client.upload_session('11493C07ED3EABB6E59874D3A1EF3581').abort()
print('Upload was successfully canceled')
Node v3
// Cancel upload session 93D9A837B45F
client.files.abortUploadSession('93D9A837B45F', callback);