> For the complete documentation index, see [llms.txt](https://docs.nebulablock.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nebulablock.com/api-reference/platform-api/list-workspaces/delete-file.md).

# Delete File

Delete one or more objects from a bucket in a single batched call.

Delete one or more objects from a bucket. Deletion is batched — pass every key you want removed in a single call.

## HTTP Request

`DELETE` `{API_URL}/object-storage/file`

where `API_URL = https://api.nebulablock.com/api/v1`.

## Body Parameters

| Parameter             | Requirement | Type      | Description                                                                                                       |
| --------------------- | ----------- | --------- | ----------------------------------------------------------------------------------------------------------------- |
| `object_storage_name` | Required    | `string`  | The workspace holding the bucket                                                                                  |
| `bucket_name`         | Required    | `string`  | The bucket holding the objects                                                                                    |
| `file_keys`           | Required    | `list`    | The object keys to delete, as returned by [List Files](/api-reference/platform-api/list-workspaces/list-files.md) |
| `team_id`             | Optional    | `integer` | Act on a team's storage. See [Teams](/account/teams.md)                                                           |

## Response Attributes

#### data `list`

Always empty on this endpoint.

#### status `string`

`success` or `failed`.

#### message `string`

A description of the result.

> **Note:** The response does not report per-key outcomes. To confirm what was removed, call [List Files](/api-reference/platform-api/list-workspaces/list-files.md) afterwards.

## Example

#### Request

```bash
curl -X DELETE '{API_URL}/object-storage/file' \
-H 'Authorization: Bearer {TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
    "object_storage_name": "research-datasets",
    "bucket_name": "checkpoints",
    "file_keys": ["run-42/model.safetensors", "run-42/optimizer.pt"]
}'
```

#### Response

```json
{
    "data": [],
    "message": "File deleted successfully",
    "status": "success"
}
```

## See also

* [List Files](/api-reference/platform-api/list-workspaces/list-files.md)
* [Delete Bucket](/api-reference/platform-api/list-workspaces/delete-bucket.md)
