---
title: "Delete an existing secret by id."
method: DELETE
path: "/secrets/{id}"
tags: ["Secret Operations"]
---

# Delete an existing secret by id.

`DELETE /secrets/{id}`

## Request

- Base URL: `https://replace-with-account.api.decodable.co/v1alpha2`
- URL: `https://replace-with-account.api.decodable.co/v1alpha2/secrets/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/decodable/apis/decodable-control-plane/docs/secrets/:id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Requires permission matching: `secret:write:default.<name>`.

## Response `204`

Secret successfully deleted.

## Other responses

- `403`: Access denied: requesting user lacks a required permission.
- `404`: The requested resource does not exist.
- `default`: An error has occurred.

---

[API](https://skmtc.dev/decodable/apis/decodable-control-plane.md) - [All operations](https://skmtc.dev/decodable/apis/decodable-control-plane/llms.txt) - [OpenAPI document](https://skmtc.dev/decodable/apis/decodable-control-plane/revisions/9718a3019da8?raw)
