Azure Key Vault Deletedsecrets API

The Deletedsecrets API from Azure Key Vault — 3 operation(s) for deletedsecrets.

GitHub OpenAPI

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /deletedsecrets List soft-deleted secrets · Lists deleted secrets for the specified vault #
Ask an LLM
“Which secrets have been deleted from my vault but not yet purged?”
“Can I page through deleted secrets?”
Tell an agent
List deleted secrets in the vault.
Show up to {maxresults} deleted secrets.
GET /deletedsecrets/{secret-name} Get a deleted secret · Gets the specified deleted secret #
Ask an LLM
“Can I read the attributes of a secret I deleted?”
“What does a deleted secret contain?”
Tell an agent
Get deleted secret {secret}.
Show the attributes of deleted secret {secret}.
DELETE /deletedsecrets/{secret-name} Permanently delete a deleted secret · Permanently deletes the specified secret #
Ask an LLM
“How do I permanently remove a deleted secret so it can't be recovered?”
“Can I purge a secret that was soft-deleted?”
Tell an agent destructive · confirm first
Purge deleted secret {secret}.
Permanently remove the soft-deleted secret {secret}.
POST /deletedsecrets/{secret-name}/recover Recover a deleted secret · Recovers the deleted secret to the latest version #
Ask an LLM
“Can I bring back a secret I deleted by mistake?”
“How do I restore a deleted secret to its latest version?”
Tell an agent
Recover deleted secret {secret}.
Restore the deleted secret {secret} to the latest version.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-key-vault:microsoft-azure-key-vault-deletedsecrets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-key-vault-deletedsecrets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: KeyVaultClient Deletedsecrets API
  version: '7.6'
  description: The key vault client performs cryptographic key operations and vault operations against the Key Vault service.
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
security:
- OAuth2Auth:
  - https://vault.azure.net/.default
tags:
- name: Deletedsecrets
paths:
  /deletedsecrets:
    get:
      operationId: GetDeletedSecrets
      summary: Lists deleted secrets for the specified vault
      description: The Get Deleted Secrets operation returns the secrets that have been deleted for a vault enabled for soft-delete. This operation requires the secrets/list permission.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: maxresults
        in: query
        description: Maximum number of results to return in a page. If not specified the service will return up to 25 results.
        required: false
        schema:
          type: integer
          format: int32
          maximum: 25
          minimum: 1
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedSecretListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyVaultError'
      x-ms-pageable:
        nextLinkName: nextLink
      tags:
      - Deletedsecrets
  /deletedsecrets/{secret-name}:
    get:
      operationId: GetDeletedSecret
      summary: Gets the specified deleted secret
      description: The Get Deleted Secret operation returns the specified deleted secret along with its attributes. This operation requires the secrets/get permission.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: secret-name
        in: path
        description: The name of the secret.
        required: true
        x-ms-client-name: secretName
        schema:
          type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedSecretBundle'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyVaultError'
      tags:
      - Deletedsecrets
    delete:
      operationId: PurgeDeletedSecret
      summary: Permanently deletes the specified secret
      description: The purge deleted secret operation removes the secret permanently, without the possibility of recovery. This operation can only be enabled on a soft-delete enabled vault. This operation requires the secrets/purge permission.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: secret-name
        in: path
        description: The name of the secret.
        required: true
        x-ms-client-name: secretName
        schema:
          type: string
      responses:
        '204':
          description: 'There is no content to send for this request, but the headers may be useful. '
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyVaultError'
      tags:
      - Deletedsecrets
  /deletedsecrets/{secret-name}/recover:
    post:
      operationId: RecoverDeletedSecret
      summary: Recovers the deleted secret to the latest version
      description: Recovers the deleted secret in the specified vault. This operation can only be performed on a soft-delete enabled vault. This operation requires the secrets/recover permission.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: secret-name
        in: path
        description: The name of the deleted secret.
        required: true
        x-ms-client-name: secretName
        schema:
          type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretBundle'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyVaultError'
      tags:
      - Deletedsecrets
components:
  schemas:
    Error:
      type:
      - object
      - 'null'
      properties:
        code:
          type: string
          description: The error code.
          readOnly: true
        message:
          type: string
          description: The error message.
          readOnly: true
        innererror:
          $ref: '#/components/schemas/Error'
          description: The key vault server error.
          readOnly: true
          x-ms-client-name: innerError
    DeletedSecretItem:
      type: object
      description: The deleted secret item containing metadata about the deleted secret.
      properties:
        id:
          type: string
          description: Secret identifier.
        attributes:
          $ref: '#/components/schemas/SecretAttributes'
          description: The secret management attributes.
        tags:
          type: object
          description: Application specific metadata in the form of key-value pairs.
          additionalProperties:
            type: string
        contentType:
          type: string
          description: Type of the secret value such as a password.
        managed:
          type: boolean
          description: True if the secret's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.
          readOnly: true
        recoveryId:
          type: string
          description: The url of the recovery object, used to identify and recover the deleted secret.
        scheduledPurgeDate:
          type: integer
          format: unixtime
          description: The time when the secret is scheduled to be purged, in UTC
          readOnly: true
        deletedDate:
          type: integer
          format: unixtime
          description: The time when the secret was deleted, in UTC
          readOnly: true
    KeyVaultError:
      type: object
      description: The key vault error exception.
      properties:
        error:
          $ref: '#/components/schemas/Error'
          description: The key vault server error.
          readOnly: true
    SecretBundle:
      type: object
      description: A secret consisting of a value, id and its attributes.
      properties:
        value:
          type: string
          description: The secret value.
        id:
          type: string
          description: The secret id.
        contentType:
          type: string
          description: The content type of the secret.
        attributes:
          $ref: '#/components/schemas/SecretAttributes'
          description: The secret management attributes.
        tags:
          type: object
          description: Application specific metadata in the form of key-value pairs.
          additionalProperties:
            type: string
        kid:
          type: string
          description: If this is a secret backing a KV certificate, then this field specifies the corresponding key backing the KV certificate.
          readOnly: true
        managed:
          type: boolean
          description: True if the secret's lifetime is managed by key vault. If this is a secret backing a certificate, then managed will be true.
          readOnly: true
    DeletedSecretBundle:
      type: object
      description: A Deleted Secret consisting of its previous id, attributes and its tags, as well as information on when it will be purged.
      properties:
        value:
          type: string
          description: The secret value.
        id:
          type: string
          description: The secret id.
        contentType:
          type: string
          description: The content type of the secret.
        attributes:
          $ref: '#/components/schemas/SecretAttributes'
          description: The secret management attributes.
        tags:
          type: object
          description: Application specific metadata in the form of key-value pairs.
          additionalProperties:
            type: string
        kid:
          type: string
          description: If this is a secret backing a KV certificate, then this field specifies the corresponding key backing the KV certificate.
          readOnly: true
        managed:
          type: boolean
          description: True if the secret's lifetime is managed by key vault. If this is a secret backing a certificate, then managed will be true.
          readOnly: true
        recoveryId:
          type: string
          description: The url of the recovery object, used to identify and recover the deleted secret.
        scheduledPurgeDate:
          type: integer
          format: unixtime
          description: The time when the secret is scheduled to be purged, in UTC
          readOnly: true
        deletedDate:
          type: integer
          format: unixtime
          description: The time when the secret was deleted, in UTC
          readOnly: true
    DeletionRecoveryLevel:
      type: string
      description: Reflects the deletion recovery level currently in effect for secrets in the current vault. If it contains 'Purgeable', the secret can be permanently deleted by a privileged user; otherwise, only the system can purge the secret, at the end of the retention interval.
      enum:
      - Purgeable
      - Recoverable+Purgeable
      - Recoverable
      - Recoverable+ProtectedSubscription
      - CustomizedRecoverable+Purgeable
      - CustomizedRecoverable
      - CustomizedRecoverable+ProtectedSubscription
      x-ms-enum:
        name: DeletionRecoveryLevel
        modelAsString: true
        values:
        - name: Purgeable
          value: Purgeable
          description: Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.)
        - name: RecoverablePurgeable
          value: Recoverable+Purgeable
          description: Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered
        - name: Recoverable
          value: Recoverable
          description: Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered
        - name: RecoverableProtectedSubscription
          value: Recoverable+ProtectedSubscription
          description: Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself  cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered
        - name: CustomizedRecoverablePurgeable
          value: CustomizedRecoverable+Purgeable
          description: Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7 <= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled.
        - name: CustomizedRecoverable
          value: CustomizedRecoverable
          description: Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7 <= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available.
        - name: CustomizedRecoverableProtectedSubscription
          value: CustomizedRecoverable+ProtectedSubscription
          description: Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7 <= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled.
    DeletedSecretListResult:
      type: object
      description: The deleted secret list result
      properties:
        value:
          type: array
          description: A response message containing a list of deleted secrets in the key vault along with a link to the next page of deleted secrets.
          items:
            $ref: '#/components/schemas/DeletedSecretItem'
          readOnly: true
        nextLink:
          type: string
          description: The URL to get the next set of deleted secrets.
          readOnly: true
    SecretAttributes:
      type: object
      description: The secret management attributes.
      properties:
        enabled:
          type: boolean
          description: Determines whether the object is enabled.
        nbf:
          type: integer
          format: unixtime
          description: Not before date in UTC.
          x-ms-client-name: NotBefore
        exp:
          type: integer
          format: unixtime
          description: Expiry date in UTC.
          x-ms-client-name: Expires
        created:
          type: integer
          format: unixtime
          description: Creation time in UTC.
          readOnly: true
        updated:
          type: integer
          format: unixtime
          description: Last updated time in UTC.
          readOnly: true
        recoverableDays:
          type: integer
          format: int32
          description: softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0.
          readOnly: true
        recoveryLevel:
          $ref: '#/components/schemas/DeletionRecoveryLevel'
          description: Reflects the deletion recovery level currently in effect for secrets in the current vault. If it contains 'Purgeable', the secret can be permanently deleted by a privileged user; otherwise, only the system can purge the secret, at the end of the retention interval.
          readOnly: true
  parameters:
    Azure.Core.Foundations.ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      x-ms-parameter-location: method
      x-ms-client-name: apiVersion
      schema:
        type: string
        minLength: 1
  securitySchemes:
    OAuth2Auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            https://vault.azure.net/.default: ''
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
x-ms-parameterized-host:
  hostTemplate: '{vaultBaseUrl}'
  useSchemePrefix: false
  parameters:
  - name: vaultBaseUrl
    in: path
    required: true
    type: string
    format: uri
    x-ms-skip-url-encoding: true