Penv Cloud
Start free
Docs
Reference

Write a new version of a secret

Seals the value at that address and appends a version.

PUT/api/v1/secrets/{address}

Seals the value at that address and appends a version. We overwrite nothing, so an earlier version stays readable for recovery and rotation.

AuthorizationBearer <token>

A machine credential, sent as Authorization: Bearer pck_.... Issue one from the console, or get a short-lived one from an exchange under auth.

In: header

Path Parameters

address*string

The parameter address. The last segment is the name and everything before it is the path, so slashes are part of the address and are not escaped. A parameter at the root is its bare name.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The new value. We accept only a string; there is no typed write. At most 256 KiB (262,144 bytes of UTF-8), in a body of at most 2 MiB.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/v1/secrets/db/primary/DATABASE_URL" \  -H "Content-Type: application/json" \  -d '{    "value": "string"  }'
{  "version": -9007199254740991}