---
title: "Deletes a file, or a folder and everything in it"
method: DELETE
path: "/lambdas/{privateKey}/files/{path}"
tags: ["Workspace"]
---

# Deletes a file, or a folder and everything in it

`DELETE /lambdas/{privateKey}/files/{path}`

## Request

- Base URL: `https://genhttp.dev/api/v1`
- URL: `https://genhttp.dev/api/v1/lambdas/{privateKey}/files/{path}`
- Auth: none declared

Nothing happens for a path where there is nothing.

## Path parameters

- `privateKey` string, required
- `path` string, required

## Response `204`

Done. There is no body.

## Other responses

- `400`: The path is empty or leads outside of the workspace.
- `403`: The lambda is a demo, which anybody may read and nobody may change. Create a lambda of your own from it instead: `POST /lambdas` with the demo's id as `template`.
- `404`: No lambda has this editor key. A key that never existed and the key of a deleted lambda are answered alike.

---

[API](https://skmtc.dev/genhttp/apis/genhttp-lambda-api.md) · [All operations](https://skmtc.dev/genhttp/apis/genhttp-lambda-api/llms.txt) · [OpenAPI document](https://skmtc.dev/genhttp/apis/genhttp-lambda-api/revisions/8b36699e03df?raw)
