# Update a secret

Collection: api
Human docs: https://zei.sh/docs/api

Update secret metadata or material.

PATCH /public/secrets/:secretId
Permission: ORG_MANAGE.
Send only the fields that should change.
Request body: {"name":"github-token-rotated","value":"replace-me","version":"v2","format":"plaintext"}
Response: The updated secret metadata.

Example:

```
curl -X PATCH https://api.zei.sh/api/v1/public/secrets/:secretId \
  -H "X-API-Key: $ZEISH_API_KEY"
  -H "Content-Type: application/json" \
  -d '{"name":"github-token-rotated","value":"replace-me","version":"v2","format":"plaintext"}'
```
