---
title: "Update a secret"
method: PUT
path: "/secrets/{secret_id}"
tags: ["secrets"]
---

# Update a secret

`PUT /secrets/{secret_id}`

Updates an existing secret.

Required roles: All

## Path parameters

- `secret_id` string, required

## Request body

- UpdateSecretRequest
  - `name` string, required — Name of the secret
  - `secret` string — The secret value (omit to keep unchanged)
  - `description` string — Description of the secret

## Response `200`

Successfully updated secret

- Secret
  - `id` string, required — Secret ID
  - `name` string, required — Name of the secret
  - `type` 'google_drive' | 'github' | 'notion', required — The type of the secret
  - `description` string — Description of the secret
  - `last_update_time` integer, required — Last updated time (Unix timestamp in seconds)
  - `creation_time` integer, required — Creation time (Unix timestamp in seconds)

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/qlonolink/apis/qaip-apis.md) · [All operations](https://skmtc.net/qlonolink/apis/qaip-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qlonolink/qaip-apis/revisions/f5f5994dfe05/schema)
