Azure Key Vault Deletedkeys API

The Deletedkeys API from Azure Key Vault — 3 operation(s) for deletedkeys.

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 /deletedkeys List deleted keys in a vault · Lists the deleted keys in the specified vault #
Ask an LLM
“Which keys were deleted from my Key Vault?”
“Can I see the public parts of keys that are in the soft-delete state?”
Tell an agent
List the deleted keys in my vault.
Show up to {maxresults} deleted keys.
GET /deletedkeys/{key-name} Get a deleted key's public part · Gets the public part of a deleted key #
Ask an LLM
“Can I read the public part of a key that was deleted?”
“What information is kept on a soft-deleted key?”
Tell an agent
Get the public part of deleted key {key_name}.
Show me the soft-deleted key {key_name}.
DELETE /deletedkeys/{key-name} Permanently delete a deleted key · Permanently deletes the specified key #
Ask an LLM
“How do I permanently remove a deleted key from the vault?”
“Can I purge a soft-deleted key so it's gone for good?”
Tell an agent destructive · confirm first
Purge the deleted key {key_name}.
Permanently delete soft-deleted key {key_name}.
POST /deletedkeys/{key-name}/recover Restore a deleted key · Recovers the deleted key to its latest version #
Ask an LLM
“Can I bring back a key I deleted by mistake?”
“What happens to a deleted key when I recover it?”
Tell an agent
Recover the deleted key {key_name}.
Restore soft-deleted key {key_name} to its 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-deletedkeys-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-deletedkeys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: KeyVaultClient Deletedkeys 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: Deletedkeys
paths:
  /deletedkeys:
    get:
      operationId: GetDeletedKeys
      summary: Lists the deleted keys in the specified vault
      description: Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a deleted key. This operation includes deletion-specific information. The Get Deleted Keys operation is applicable for vaults enabled for soft-delete. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/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/DeletedKeyListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyVaultError'
      x-ms-pageable:
        nextLinkName: nextLink
      tags:
      - Deletedkeys
  /deletedkeys/{key-name}:
    get:
      operationId: GetDeletedKey
      summary: Gets the public part of a deleted key
      description: The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/get permission.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: key-name
        in: path
        description: The name of the key.
        required: true
        x-ms-client-name: keyName
        schema:
          type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedKeyBundle'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyVaultError'
      tags:
      - Deletedkeys
    delete:
      operationId: PurgeDeletedKey
      summary: Permanently deletes the specified key
      description: The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/purge permission.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: key-name
        in: path
        description: The name of the key
        required: true
        x-ms-client-name: keyName
        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:
      - Deletedkeys
  /deletedkeys/{key-name}/recover:
    post:
      operationId: RecoverDeletedKey
      summary: Recovers the deleted key to its latest version
      description: The Recover Deleted Key operation is applicable for deleted keys in soft-delete enabled vaults. It recovers the deleted key back to its latest version under /keys. An attempt to recover an non-deleted key will return an error. Consider this the inverse of the delete operation on soft-delete enabled vaults. This operation requires the keys/recover permission.
      parameters:
      - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter'
      - name: key-name
        in: path
        description: The name of the deleted key.
        required: true
        x-ms-client-name: keyName
        schema:
          type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyBundle'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyVaultError'
      tags:
      - Deletedkeys
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
    KeyVaultError:
      type: object
      description: The key vault error exception.
      properties:
        error:
          $ref: '#/components/schemas/Error'
          description: The key vault server error.
          readOnly: true
    KeyAttestation:
      type: object
      description: The key attestation information.
      properties:
        certificatePemFile:
          type: string
          format: base64url
          description: A base64url-encoded string containing certificates in PEM format, used for attestation validation.
        privateKeyAttestation:
          type: string
          format: base64url
          description: The attestation blob bytes encoded as base64url string corresponding to a private key.
        publicKeyAttestation:
          type: string
          format: base64url
          description: The attestation blob bytes encoded as base64url string corresponding to a public key in case of asymmetric key.
        version:
          type: string
          description: The version of the attestation.
    DeletedKeyBundle:
      type: object
      description: A DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info
      properties:
        key:
          $ref: '#/components/schemas/JsonWebKey'
          description: The Json web key.
        attributes:
          $ref: '#/components/schemas/KeyAttributes'
          description: The key management attributes.
        tags:
          type: object
          description: Application specific metadata in the form of key-value pairs.
          additionalProperties:
            type: string
        managed:
          type: boolean
          description: True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.
          readOnly: true
        release_policy:
          $ref: '#/components/schemas/KeyReleasePolicy'
          description: The policy rules under which the key can be exported.
          x-ms-client-name: releasePolicy
        recoveryId:
          type: string
          description: The url of the recovery object, used to identify and recover the deleted key.
        scheduledPurgeDate:
          type: integer
          format: unixtime
          description: The time when the key is scheduled to be purged, in UTC
          readOnly: true
        deletedDate:
          type: integer
          format: unixtime
          description: The time when the key was deleted, in UTC
          readOnly: true
    JsonWebKey:
      type: object
      description: As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18
      properties:
        kid:
          type: string
          description: Key identifier.
        kty:
          $ref: '#/components/schemas/JsonWebKeyType'
          description: JsonWebKey Key Type (kty), as defined in https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40.
        key_ops:
          type: array
          description: Json web key operations. For more information on possible key operations, see JsonWebKeyOperation.
          items:
            type: string
          x-ms-client-name: keyOps
        n:
          type: string
          format: base64url
          description: RSA modulus.
        e:
          type: string
          format: base64url
          description: RSA public exponent.
        d:
          type: string
          format: base64url
          description: RSA private exponent, or the D component of an EC private key.
        dp:
          type: string
          format: base64url
          description: RSA private key parameter.
        dq:
          type: string
          format: base64url
          description: RSA private key parameter.
        qi:
          type: string
          format: base64url
          description: RSA private key parameter.
        p:
          type: string
          format: base64url
          description: RSA secret prime.
        q:
          type: string
          format: base64url
          description: RSA secret prime, with p < q.
        k:
          type: string
          format: base64url
          description: Symmetric key.
        key_hsm:
          type: string
          format: base64url
          description: Protected Key, used with 'Bring Your Own Key'.
          x-ms-client-name: t
        crv:
          $ref: '#/components/schemas/JsonWebKeyCurveName'
          description: Elliptic curve name. For valid values, see JsonWebKeyCurveName.
        x:
          type: string
          format: base64url
          description: X component of an EC public key.
        y:
          type: string
          format: base64url
          description: Y component of an EC public key.
    DeletedKeyListResult:
      type: object
      description: A list of keys that have been deleted in this vault.
      properties:
        value:
          type: array
          description: A response message containing a list of deleted keys in the key vault along with a link to the next page of deleted keys.
          items:
            $ref: '#/components/schemas/DeletedKeyItem'
          readOnly: true
        nextLink:
          type: string
          description: The URL to get the next set of deleted keys.
          readOnly: true
    DeletedKeyItem:
      type: object
      description: The deleted key item containing the deleted key metadata and information about deletion.
      properties:
        kid:
          type: string
          description: Key identifier.
        attributes:
          $ref: '#/components/schemas/KeyAttributes'
          description: The key management attributes.
        tags:
          type: object
          description: Application specific metadata in the form of key-value pairs.
          additionalProperties:
            type: string
        managed:
          type: boolean
          description: True if the key'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 key.
        scheduledPurgeDate:
          type: integer
          format: unixtime
          description: The time when the key is scheduled to be purged, in UTC
          readOnly: true
        deletedDate:
          type: integer
          format: unixtime
          description: The time when the key was deleted, in UTC
          readOnly: true
    JsonWebKeyType:
      type: string
      description: JsonWebKey Key Type (kty), as defined in https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40.
      enum:
      - EC
      - EC-HSM
      - RSA
      - RSA-HSM
      - oct
      - oct-HSM
      x-ms-enum:
        name: JsonWebKeyType
        modelAsString: true
        values:
        - name: EC
          value: EC
          description: Elliptic Curve.
        - name: EC_HSM
          value: EC-HSM
          description: Elliptic Curve with a private key which is stored in the HSM.
        - name: RSA
          value: RSA
          description: RSA (https://tools.ietf.org/html/rfc3447)
        - name: RSA_HSM
          value: RSA-HSM
          description: RSA with a private key which is stored in the HSM.
        - name: oct
          value: oct
          description: Octet sequence (used to represent symmetric keys)
        - name: oct_HSM
          value: oct-HSM
          description: Octet sequence (used to represent symmetric keys) which is stored the HSM.
    KeyBundle:
      type: object
      description: A KeyBundle consisting of a WebKey plus its attributes.
      properties:
        key:
          $ref: '#/components/schemas/JsonWebKey'
          description: The Json web key.
        attributes:
          $ref: '#/components/schemas/KeyAttributes'
          description: The key management attributes.
        tags:
          type: object
          description: Application specific metadata in the form of key-value pairs.
          additionalProperties:
            type: string
        managed:
          type: boolean
          description: True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.
          readOnly: true
        release_policy:
          $ref: '#/components/schemas/KeyReleasePolicy'
          description: The policy rules under which the key can be exported.
          x-ms-client-name: releasePolicy
    KeyReleasePolicy:
      type: object
      description: The policy rules under which the key can be exported.
      properties:
        contentType:
          type: string
          description: Content type and version of key release policy
          default: application/json; charset=utf-8
        immutable:
          type: boolean
          description: Defines the mutability state of the policy. Once marked immutable, this flag cannot be reset and the policy cannot be changed under any circumstances.
        data:
          type: string
          format: base64url
          description: Blob encoding the policy rules under which the key can be released. Blob must be base64 URL encoded.
          x-ms-client-name: encodedPolicy
    DeletionRecoveryLevel:
      type: string
      description: Reflects the deletion recovery level currently in effect for certificates in the current vault. If it contains 'Purgeable', the certificate can be permanently deleted by a privileged user; otherwise, only the system can purge the certificate, 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.
    JsonWebKeyCurveName:
      type: string
      description: Elliptic curve name. For valid values, see JsonWebKeyCurveName.
      enum:
      - P-256
      - P-384
      - P-521
      - P-256K
      x-ms-enum:
        name: JsonWebKeyCurveName
        modelAsString: true
        values:
        - name: P256
          value: P-256
          description: The NIST P-256 elliptic curve, AKA SECG curve SECP256R1.
        - name: P384
          value: P-384
          description: The NIST P-384 elliptic curve, AKA SECG curve SECP384R1.
        - name: P521
          value: P-521
          description: The NIST P-521 elliptic curve, AKA SECG curve SECP521R1.
        - name: P256_K
          value: P-256K
          description: The SECG SECP256K1 elliptic curve.
    KeyAttributes:
      type: object
      description: The attributes of a key managed by the key vault service.
      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 keys in the current vault. If it contains 'Purgeable' the key can be permanently deleted by a privileged user; otherwise, only the system can purge the key, at the end of the retention interval.
          readOnly: true
        exportable:
          type: boolean
          description: Indicates if the private key can be exported. Release policy must be provided when creating the first version of an exportable key.
        hsmPlatform:
          type: string
          description: The underlying HSM Platform.
          readOnly: true
        attestation:
          $ref: '#/components/schemas/KeyAttestation'
          description: The key or key version attestation information.
          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