ReferenceAPI

Update a secret

Update a secret's value under the same id, touching no computer.

PATCH https://api.nevia.cloud/v1/secrets/{sec}
curl -X PATCH "https://api.nevia.cloud/v1/secrets/01d4cnjqmc7d2pk9r4w6y8b0c3f" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: 8f1c2a7e-3b4d-4c5e-9f0a-1b2c3d4e5f60" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "<new secret value>"
  }'
{
  "secret": {
    "id": "01d4cnjqmc7d2pk9r4w6y8b0c3f",
    "workspace": "01d4cnjjq40hnnh0nwmkg35nv2h",
    "name": "DATABASE_PASSWORD",
    "created_by": "01d4cnjmn4fbb1r5btxb5mypv62",
    "updated_by": "01d4cnjmn4fbb1r5btxb5mypv62",
    "created_at": "2026-09-10T12:34:56Z",
    "updated_at": "2026-09-10T12:34:56Z",
    "deleted_at": "2026-09-10T12:34:56Z"
  },
  "operations": [
    "01d4cnjm89yk0r3xtv80dy0x7by"
  ]
}

Authorization

bearerAuth
Authorization Bearer <token>

Send the token in the Authorization: Bearer <token> header. See Authenticate.

In: header

Path Parameters

sec* string

Secret id: 27 lowercase letters and digits.

Match ^[A-Za-z0-9_-]{1,64}$

Header Parameters

Idempotency-Key* string

Required for this non-idempotent request. Clients generate one key per action and preserve it across transport retries. Within the retained window, repeats return the recorded result and different input with the same key is 409. Keys expire 10 minutes after admission, or 120 seconds after success or terminal failure, whichever is earlier. Reusing an expired key can execute new work. The API tracks at most 100,000 requests across replicas. New keys at capacity receive 429 with Retry-After of 600–630 seconds.

Length 1 <= length <= 255

Request Body

application/json

New value for the secret. To rename, delete and create

Behavior

Each computer's next exec sees the new value. Running processes keep the old one. Rotations and deletes of one secret take turns.

Response

application/json

The secret's metadata.