---
title: "Delete a secret"
method: DELETE
path: "/functions/{id}/secrets/{key}"
tags: ["Functions"]
---

# Delete a secret

`DELETE /functions/{id}/secrets/{key}`

Removes the secret. The binding stays live in the running
handler until the next deploy refreshes the binding set
(`PUT /functions/{id}` with the existing code is sufficient).
Returns 404 if the key did not exist. Managed system keys
cannot be deleted.

## Response `204`

Secret deleted

## Other responses

- `400` — Invalid request parameters
- `401` — Invalid or missing API key
- `404` — Resource not found

---

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