---
title: "Delete Secret"
method: DELETE
path: "/secrets/{name}"
---

# Delete Secret

`DELETE /secrets/{name}`

## Request

- Base URL: `https://api-docs.session-exchange.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.session-exchange.com/secrets/{name}`
- Auth: none declared

Admin, or a producer holding a `delete` prefix grant covering `name` (#761): tombstone the
secret (emit secret.deleted). 404 if absent. `?if_version=` makes it a compare-and-swap;
REQUIRED for CAS_SECRETS (which no prefix grant ever covers).

## Path parameters

- `name` string, required

## Query parameters

- `if_version` integer, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/session-exchange/apis/a4sx.md) · [All operations](https://skmtc.dev/session-exchange/apis/a4sx/llms.txt) · [OpenAPI document](https://skmtc.dev/session-exchange/apis/a4sx/revisions/abaefc33dfc7?raw)
