---
title: "Deletes a secret from a specified key vault."
method: DELETE
path: "/secrets/{secret-name}"
tags: ["Secrets"]
---

# Deletes a secret from a specified key vault.

`DELETE /secrets/{secret-name}`

The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret. This operation requires the secrets/delete permission.

## Path parameters

- `secret-name` string, required

## Query parameters

- `api-version` string, required

## Response `200`

The deleted secret and information on when the secret will be deleted, and how to recover the deleted secret.

- DeletedSecretBundle — A secret consisting of a value, id and its attributes.
  - `value` string — The secret value.
  - `id` string — The secret id.
  - `contentType` string — The content type of the secret.
  - `attributes` SecretAttributes — The object attributes managed by the KeyVault service.
    - `enabled` boolean — Determines whether the object is enabled.
    - `nbf` integer — Not before date in UTC.
    - `exp` integer — Expiry date in UTC.
    - `created` integer — Creation time in UTC.
    - `updated` integer — Last updated time in UTC.
  - `tags` object — Application specific metadata in the form of key-value pairs.
  - `kid` string — If this is a secret backing a KV certificate, then this field specifies the corresponding key backing the KV certificate.
  - `managed` boolean — True if the secret's lifetime is managed by key vault. If this is a secret backing a certificate, then managed will be true.

## Other responses

- `default` — Key Vault error response describing why the operation failed.

---

[API](https://skmtc.net/azure/apis/keyvaultclient.md) · [All operations](https://skmtc.net/azure/apis/keyvaultclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/keyvaultclient/revisions/1f612999ec40/schema)
