---
title: "Delete a file"
method: DELETE
path: "/workspaces/{workspace_id}/files/{file_id}"
tags: ["files"]
---

# Delete a file

`DELETE /workspaces/{workspace_id}/files/{file_id}`

Deletes a file from the workspace (soft delete + storage removal)

## Path parameters

- `workspace_id` string, required
- `file_id` string, required

## Response `200`

File deleted successfully

- GithubComActiveloopaiDeeplakeApiInternalFilesDeleteFileResponse
  - `deleted` boolean
  - `id` string
  - `object` string — Always "file"

## Other responses

- `400` — Invalid workspace ID or file ID
- `401` — Unauthorized - missing or invalid authentication
- `403` — Access denied - user does not have access to this workspace
- `404` — File not found
- `500` — Internal server error

---

[API](https://skmtc.net/deeplake/apis/deeplake-api.md) · [All operations](https://skmtc.net/deeplake/apis/deeplake-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeplake/deeplake-api/revisions/e16ed11d991c/schema)
