---
title: "Update secret"
method: PUT
path: "/api/secrets/{key}"
tags: ["Admin"]
---

# Update secret

`PUT /api/secrets/{key}`

Update an existing secret's value or metadata

## Path parameters

- `key` string, required

## Request body

- object
  - `value` string — New secret value (will be encrypted)
  - `isActive` boolean — Whether the secret is active
  - `isReserved` boolean — Whether the secret is protected from deletion
  - `expiresAt` string, date-time, nullable — Expiration date (null to remove expiration)

## Response `200`

Secret updated successfully

- object
  - `success` boolean
  - `message` string

## Other responses

- `404` — Secret not found
- `500` — Failed to update secret

---

[API](https://skmtc.net/insforge/apis/insforge-authentication-api.md) · [All operations](https://skmtc.net/insforge/apis/insforge-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/insforge/insforge-authentication-api/versions/a935bb49f932/schema)
