---
title: "Delete file"
method: DELETE
path: "/v1/files/{fileId}"
tags: ["Digital Asset Management (DAM)", "Managing assets"]
---

# Delete file

`DELETE /v1/files/{fileId}`

This API deletes the file and all its file versions permanently.

Note: If a file or specific transformation has been requested in the past, then the response is cached. Deleting a file does not purge the cache. You can purge the cache using purge cache API.

## Path parameters

- `fileId` string, required

## Response `204`

File deleted successfully.

## Other responses

- `400` — Bad Request.
- `401` — Unauthorized request.
- `403` — Forbidden.
- `404` — File not found.
- `429` — The request exceeded the rate limit. Contains headers indicating the limits and a message detailing the error.

---

[API](https://skmtc.dev/imagekit-developer/apis/imagekit-api.md) · [All operations](https://skmtc.dev/imagekit-developer/apis/imagekit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/imagekit-developer/imagekit-api/revisions/bb3e9ff84b3e/schema)
