For AI agents: markdown of this page — /docs-content-en/storage/upload/multipart-abort.md documentation index — /llms.txt

Abort multipart upload

POST /v1/storage/objects/multipart/abort

Aborts an incomplete multipart upload session: frees the uploaded parts and deletes the object record. The operation is irreversible — once aborted, the uploaded data cannot be recovered.

Request fields (body)

The request body is JSON.

Parameter Type Required Default Description
objectId string yes Object identifier obtained from the /multipart/create response

Examples

curl — personal key

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/storage/objects/multipart/abort \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"objectId": "cmpfg012a01aco510mrr6u632"}'

curl — OAuth application

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/storage/objects/multipart/abort \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"objectId": "cmpfg012a01aco510mrr6u632"}'

JavaScript — personal key

javascript
const res = await fetch(
  'https://vibecode.bitrix24.com/v1/storage/objects/multipart/abort',
  {
    method: 'POST',
    headers: {
      'X-Api-Key': 'YOUR_API_KEY',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ objectId: 'cmpfg012a01aco510mrr6u632' }),
  }
)
const { aborted } = await res.json()
console.log('Aborted:', aborted) // true

JavaScript — OAuth application

javascript
const res = await fetch(
  'https://vibecode.bitrix24.com/v1/storage/objects/multipart/abort',
  {
    method: 'POST',
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ objectId: 'cmpfg012a01aco510mrr6u632' }),
  }
)
const { aborted } = await res.json()

Response fields

Field Type Description
aborted boolean true on successful abort

Response example

JSON
{
  "aborted": true
}

Error response example

404 — the object was not found or the session is already finalized:

JSON
{
  "success": false,
  "error": {
    "code": "STORAGE_OBJECT_NOT_FOUND",
    "message": "StorageObject cmpfg012a01aco510mrr6u632 not found"
  }
}

Errors

HTTP Code Description
403 STORAGE_SCOPE_REQUIRED The API key lacks the vibe:storage scope
401 STORAGE_NO_AUTH_CONTEXT The request was made without authorization
400 STORAGE_INVALID_PATH The caller identifier contains invalid path characters
400 STORAGE_OBJECT_ID_REQUIRED The objectId field was not provided
404 STORAGE_OBJECT_NOT_FOUND The object with the given objectId was not found, does not belong to the current caller, or the session is already finalized
503 STORAGE_FEATURE_DISABLED Storage is disabled for the portal
503 STORAGE_STS_UNAVAILABLE The temporary credentials issuance service is unavailable

Full list of common API errors — Errors.

Known specifics

Incomplete sessions are deleted automatically after 24 hours. An explicit /abort call frees the resources immediately, without waiting for automatic cleanup.

See also