---
title: "Update Secret"
method: PUT
path: "/api/v1/secrets/{secret_name}"
tags: ["secrets"]
---

# Update Secret

`PUT /api/v1/secrets/{secret_name}`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/api/v1/secrets/{secret_name}`
- Auth: none declared

Update a secret's value in OpenBao.

Use deployment_id query param if the secret is deployment-scoped.

## Path parameters

- `secret_name` string, required

## Query parameters

- `deployment_id` string, nullable
- `database_id` string, nullable
- `organization_id` string, uuid, nullable

## Request body

- SecretUpdate
  - `value` string, nullable
  - `generate` boolean

## Response `200`

Successful Response

- SecretResponse
  - `name` string, required
  - `key` string, required
  - `deployment_id` string, nullable
  - `database_id` string, nullable
  - `organization_id` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
