> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Blob Chunked Upload Abort

> This documentation provides a comprehensive overview of the DELETE /v1/objects/chunked endpoint of the SquareCloud Blob API.

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  The API key for your account. You can find this in your [account settings](https://squarecloud.app/en/account/security).
</ParamField>

Chunked Abort cancels an upload opened with [Chunked Init](/en/blob-reference/endpoint/chunked-init) and drops the chunks already stored. It is **idempotent**: aborting an upload that was already completed or aborted still reports success.

Call it whenever the user abandons an upload. Until then, the stored chunks count against the account's limit of 8 open uploads, and only the service's reclaim job frees them, about 24 hours after the last activity. A client that loses its token cannot cancel, so persist the token if the upload spans a page reload.

This is deliberately the loosest-limited route of the chunked flow (10 requests per 10 seconds): cancelling a batch of uploads should never be throttled into leaving them open.

<ParamField body="upload" type="string" placeholder="Upload token" required>
  The opaque `upload` token returned by Chunked Init.

  ```json theme={null}
  { "upload": "UPLOAD_TOKEN" }
  ```
</ParamField>

### Response

<ResponseField name="status" type="string">
  Indicates whether the call was successful. "success" if successful, "error" if not.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://blob.squarecloud.app/v1/objects/chunked' \
    --header 'Authorization: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{ "upload": "UPLOAD_TOKEN" }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://blob.squarecloud.app/v1/objects/chunked', {
    method: 'DELETE',
    headers: {
      Authorization: 'YOUR_API_KEY',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ upload: uploadToken }),
  });
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      'https://blob.squarecloud.app/v1/objects/chunked',
      headers={'Authorization': 'YOUR_API_KEY'},
      json={'upload': upload_token},
  )
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "status": "success"
  }
  ```
</ResponseExample>

### Troubleshooting

<Tabs>
  <Tab title="400 Status Code">
    ### Upload-Related

    <CodeGroup>
      ```json INVALID_UPLOAD_TOKEN theme={null}
      // The upload token is missing, malformed, or does not belong to your account.
      {
          "status": "error",
          "code": "INVALID_UPLOAD_TOKEN"
      }
      ```
    </CodeGroup>
  </Tab>

  <Tab title="401 Status Code">
    ### Unauthorized

    <CodeGroup>
      ```json ACCESS_DENIED theme={null}
      // The API key is missing or invalid. Set a valid key in the Authorization header.
      {
          "status": "error",
          "code": "ACCESS_DENIED"
      }
      ```
    </CodeGroup>
  </Tab>

  <Tab title="429 Status Code">
    ### Rate limited

    <CodeGroup>
      ```json RATE_LIMITED theme={null}
      // Abort rate limit reached (10 requests per 10s window, blocked for 10s).
      {
          "status": "error",
          "code": "RATE_LIMITED"
      }
      ```
    </CodeGroup>
  </Tab>
</Tabs>
