You do not have to cancel an upload you stop using: it expires on its own after an hour without a new piece.

Path parameters
ParameterDescription
uploadUrl
string
optionalFor DELETE {uploadUrl}: the uploadUrl from Create Upload, used exactly as returned.
id
string
optionalFor DELETE /v1/uploads/{id}: the upload's id, which starts with upl_.
Header parameters
ParameterDescription
Authorization
string
optionalOnly for DELETE /v1/uploads/{id}: Bearer API_Key. Never send it to the upload URL.

Example request

# With the upload URL: no API key
curl --request DELETE "$UPLOAD_URL"

# With the upload's id and your API key
curl --request DELETE 'https://api.cloudfiles.io/v1/uploads/upl_66f3c1a2b4d5e6f708192a3b' \
  --header 'Authorization: Bearer API_Key'

Response body

204 No Content, with no body, also when the upload was already cancelled or expired.

Errors

StatuserrorCodeWhat it means
404UPLOAD/NOT_FOUNDNo upload with this URL or id in your account.
409UPLOAD/ALREADY_COMPLETINGThe upload is finishing or finished. To remove the file, use Delete File.
403COMMON/FORBIDDENDELETE /v1/uploads/{id}: the API key is missing or unknown.