---
title: "Deletes a secret"
method: DELETE
path: "/lambdas/{privateKey}/secrets/{name}"
tags: ["Secrets"]
---

# Deletes a secret

`DELETE /lambdas/{privateKey}/secrets/{name}`

## Request

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

From its next request on, code that reads it fails, and code that asks `Secret.Exists` is told it is not there.

## Path parameters

- `privateKey` string, required
- `name` string, required

## Response `204`

Done. There is no body.

## Other responses

- `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, or it has no secret of that name.

---

[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)
