Skip to Content
Secrets

Update metadata or rotate a secret

Permissionsecrets:updateAuthentication
PATCH
/secrets/{id}

Updates the nullable description and/or replaces the encrypted value. The stable secret name cannot be changed. A semantic no-op succeeds and is audited.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Header Parameters

If-Match?string

Optional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource.

Request Body

application/json
  1. body

Secret names are immutable and therefore absent. Send description:null to clear the note; send value to rotate the encrypted value.

Properties1 <= properties
description?|
Lengthlength <= 2000
value?string

Write-only replacement value, at most 16384 encoded UTF-8 bytes.

Length1 <= length

Response Body

Updated safe metadata; the submitted value is never echoed.

application/json
  1. response

Safe write-only secret metadata. No plaintext, ciphertext, data-key ID, or wrapped key is ever included.

id*string
Formatuuid
name*SecretName

Stable name of an active workspace secret. The referenced plaintext is never returned through the API.

Match^[A-Za-z_][A-Za-z0-9_]{1,63}$
Length2 <= length <= 64
description*string|null
fingerprint_suffix*|

Up to the final four characters of the submitted value, for operator identification only.

Lengthlength <= 4
last_used_at*|
Formatdate-time
archived_at*|
Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.kejue.co/v1/secrets/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "description": "string",  "fingerprint_suffix": "stri",  "last_used_at": "2019-08-24T14:15:22Z",  "archived_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}