---
title: "Update a secret"
method: PATCH
path: "/deployments/secrets/{id}"
tags: ["Secrets"]
---

# Update a secret

`PATCH /deployments/secrets/{id}`

Update an existing secret's value or metadata

## Path parameters

- `id` string, required — Secret ID or name

## Request body

- UpdateSecretRequest
  - `description` string — Description is an optional human-readable description of the secret's purpose (max 500 characters)
  - `name` string — Name is the new unique identifier for the secret. Can contain alphanumeric characters, underscores, hyphens, forward slashes, and periods (1-100 characters)
  - `project_id` string — ProjectID is ignored - the project is automatically determined from your authentication
  - `value` string — Value is the new sensitive data to store securely. Updating this replaces the existing secret value.

## Response `200`

Secret updated successfully

- SecretResponseItem
  - `created_at` string — CreatedAt is the ISO8601 timestamp when this secret was created
  - `created_by` string — CreatedBy is the identifier of who created this secret.
  - `description` string — Description is a human-readable description of the secret's purpose
  - `id` string — ID is the unique identifier for this secret
  - `last_updated_by` string — LastUpdatedBy is the identifier of who last updated this secret.
  - `name` string — Name is the name/key of the secret
  - `object` 'secret' — The object type, which is always `secret`.
  - `updated_at` string — UpdatedAt is the ISO8601 timestamp when this secret was last updated

## Other responses

- `400` — Invalid request
- `404` — Secret not found
- `500` — Internal server error

---

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