---
title: "Restores a backed up secret to a vault."
method: POST
path: "/secrets/restore"
tags: ["Secrets"]
---

# Restores a backed up secret to a vault.

`POST /secrets/restore`

Restores a backed up secret, and all its versions, to a vault. This operation requires the secrets/restore permission.

## Query parameters

- `api-version` string, required

## Request body

- SecretRestoreParameters — The secret restore parameters.
  - `value` string, base64url, required — The backup blob associated with a secret bundle.

## Response `200`

Restored secret bundle in the vault.

- SecretBundle — 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)
