Update secret

Update an existing secret. After updating, the version is automatically incremented.

Validation Rules:

  • Only value and entity_id can be updated
  • value: max 8KB

Response: Returns updated metadata with incremented version.

Path Parameters
  • name
    Type: string Pattern: ^[a-zA-Z0-9_]{1,64}$
    required

    Secret name.

Body·
required
application/json

Request to update an existing secret. At least one of value or entity_id must be provided.

  • entity_id
    Type: string

    Update the entity scope.

  • value
    Type: string
    max length:  
    8192

    New plaintext secret value. Max 8KB.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Secret not found

  • application/json
  • 500

    Internal Error

Request Example for patch/secrets/{name}
curl 'https://forward.checkout.com/secrets/{name}' \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "entity_id": "ent_1234",
  "value": "NEW_VALUE_1"
}'
{
  "name": "secret_name_1",
  "created_at": "2025-10-14T00:00:00Z",
  "updated_at": "2025-10-14T12:00:00Z",
  "version": 2,
  "entity_id": "ent_123"
}