Skip to main content
PUT
Replace a secret version's wrapping
See customer-protected secrets for SDK examples. The SDKs’ secrets.rewrap() does this for every version.

Authorizations

x-api-key
string
header
required

Path Parameters

id
string<uuid>
required

Secret ID.

version
integer
required

Version number.

Required range: 1 <= x <= 2147483647

Body

application/json
envelope
string
required

The version's inner envelope, wrapped with your new key, in the same form as a customer-protected version upload.

Maximum string length: 65536
innerDigest
string
required

The version's innerDigest. It must match: only the wrapping changes, never the value (otherwise 409 SECRET_DIGEST_MISMATCH).

Response

Success

A customer-protected version as stored. Unwrap envelope with your key to get the inner envelope each use passes as unwrapped.

version
integer
required
Required range: x >= 1
kid
string
required

ID of the platform public key the inner envelope is encrypted to.

retiresAt
string<date-time> | null
required

When that platform key is retired, or null.

outerKid
string
required

ID of your key that wrapped the version.

innerDigest
string
required

Unpadded base64url SHA-256 of the inner envelope. Check the envelope you unwrap against it.

envelope
string
required

The wrapped envelope, which only your key can open.