--- layout: "http" page_title: "HTTP API: /sys/rekey/" sidebar_current: "docs-http-rotate-rekey" description: |- The `/sys/rekey/` endpoints are used to rekey the unseal keys for Vault. --- # /sys/rekey/init ## GET
Description
Reads the configuration and progress of the current rekey attempt.
Method
GET
URL
`/sys/rekey/init`
Parameters
None
Returns
If a rekey is started, then `n` is the new shares to generate and `t` is the threshold required for the new shares. `progress` is how many unseal keys have been provided for this rekey, where `required` must be reached to complete. The `nonce` for the current rekey operation is also displayed. If PGP keys are being used to encrypt the final shares, the key fingerprints and whether the final keys will be backed up to physical storage will also be displayed. ```javascript { "started": true, "nonce": "2dbd10f1-8528-6246-09e7-82b25b8aba63", "t": 3, "n": 5, "progress": 1, "required": 3, "pgp_fingerprints": ["abcd1234"], "backup": true } ```
## PUT
Description
Initializes a new rekey attempt. Only a single rekey attempt can take place at a time, and changing the parameters of a rekey requires canceling and starting a new rekey, which will also provide a new nonce.
Method
PUT
URL
`/sys/rekey/init`
Parameters
Returns
`204` response code.
## DELETE
Description
Cancels any in-progress rekey. This clears the rekey settings as well as any progress made. This must be called to change the parameters of the rekey.
Method
DELETE
URL
`/sys/rekey/init`
Parameters
None
Returns
`204` response code.
# /sys/rekey/backup ## GET
Description
Return the backup copy of PGP-encrypted unseal keys. The returned value is the nonce of the rekey operation and a map of PGP key fingerprint to hex-encoded PGP-encrypted key.
Method
GET
URL
`/sys/rekey/backup`
Parameters
None
Returns
```javascript { "nonce": "2dbd10f1-8528-6246-09e7-82b25b8aba63", "keys": { "abcd1234": "..." } } ```
## DELETE
Description
Delete the backup copy of PGP-encrypted unseal keys.
Method
DELETE
URL
`/sys/rekey/backup`
Parameters
None
Returns
`204` response code.
# /sys/rekey/update ## PUT
Description
Enter a single master key share to progress the rekey of the Vault. If the threshold number of master key shares is reached, Vault will complete the rekey. Otherwise, this API must be called multiple times until that threshold is met. The rekey nonce operation must be provided with each call.
Method
PUT
URL
`/sys/rekey/update`
Parameters
Returns
A JSON-encoded object indicating the rekey operation nonce and completion status; if completed, the new master keys are returned. If the keys are PGP-encrypted, an array of key fingerprints will also be provided (with the order in which the keys were used for encryption) along with whether or not the keys were backed up to physical storage: ```javascript { "complete": true, "keys": ["one", "two", "three"], "nonce": "2dbd10f1-8528-6246-09e7-82b25b8aba63", "pgp_fingerprints": ["abcd1234"], "backup": true } ```