> ## 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 Delete Objects

> This documentation provides a comprehensive overview of the DELETE /v1/objects 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>

Delete removes a single stored object by its full key, including the owning account's ID prefix. There's no bulk delete: the endpoint only ever acts on one name, taken from the `object` field or the first entry of an `objects` array (kept for backward compatibility), so removing many files means one request per object.

The object key is validated against your token's account ID before the delete runs; a key that resolves outside your own prefix is rejected as `INVALID_OBJECT` rather than treated as a cross-tenant lookup. A single database query both performs the delete and confirms the object existed, so deleting a name that's already gone returns `OBJECT_NOT_FOUND`.

To find the exact object key before deleting it, list your objects with [Object List](/en/blob-reference/endpoint/list); to check storage usage after cleanup, see [Account Stats](/en/blob-reference/endpoint/stats).

<ParamField body="object" type="string" placeholder="Object name" required>
  The name of the object to delete. The object name must adhere to the following pattern: `a to z, A to Z, 0 to 9, and _`.

  ```json theme={null}
  { "object": "ID/prefix/name1_ltq7b2sw-de6241.jpeg" }
  ```
</ParamField>

### Response

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

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

### Troubleshooting

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

    <CodeGroup>
      ```json INVALID_BODY theme={null}
      // The request body is missing or is not a valid JSON object.
      {
          "status": "error",
          "code": "INVALID_BODY"
      }
      ```

      ```json INVALID_OBJECT theme={null}
      // The provided object key is invalid: it must start with your own account ID prefix and contain no path traversal.
      {
          "status": "error",
          "code": "INVALID_OBJECT"
      }
      ```

      ```json DELETE_FAILED theme={null}
      // The request to delete the objects failed. Please try again.
      {
          "status": "error",
          "code": "DELETE_FAILED"
      }
      ```
    </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="404 Status Code">
    ### Not Found

    <CodeGroup>
      ```json OBJECT_NOT_FOUND theme={null}
      // The object you are trying to delete does not exist.
      {
          "status": "error",
          "code": "OBJECT_NOT_FOUND"
      }
      ```
    </CodeGroup>
  </Tab>

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

    <CodeGroup>
      ```json RATE_LIMITED theme={null}
      // Delete rate limit reached (max 1 delete per second).
      {
          "status": "error",
          "code": "RATE_LIMITED"
      }
      ```
    </CodeGroup>
  </Tab>
</Tabs>
