---
title: API: rotating a secret keeps it a secret
description: If you rotated a secret variable over the API with only a new value, it was stored as a plain variable and its value became readable, also to read-only keys…
canonical: https://watchfor.io/changelog/2026-11-20-api-secret-rotation-stays-secret
---

[All updates](/changelog#2026-11-20-api-secret-rotation-stays-secret) 🔒 Security API Nov 20, 2026 · v 13.6.4

# API: rotating a secret keeps it a secret

If you rotated a secret variable over the API with only a new value, it was stored as a plain variable and its value became readable, also to read-only keys. The Python and Ruby SDKs did this on every update. A variable now keeps what it is unless you say otherwise, and a secret's value is never returned. If you rotated a secret through the API or these SDKs, check Settings → Variables & secrets and rotate that credential.

## What changed

- PUT /v1/variables/{name} without secret keeps what an existing variable is. Rotating a secret needs only {"value": "…"} . A new variable is still plain unless you send secret: true .

- Turning a secret into a plain variable needs an explicit secret: false together with the value, as in the dashboard.

- SDKs 0.25.1: the Python and Ruby variables.put no longer send secret: false when you leave it out. The TypeScript SDK already behaved this way.

## What to check

Open Settings → Variables & secrets . A variable that should be a secret but shows its value was turned plain by an earlier update: edit it, switch Secret on and save, then rotate the credential itself, since the value was readable in the meantime.

Share this update

---

Canonical page: https://watchfor.io/changelog/2026-11-20-api-secret-rotation-stays-secret · Site guide: https://watchfor.io/llms.txt
