Store a new version (`write`; `label` too with labels).
PUT
/v1/secrets/{path}
const url = 'https://ferritor.example.internal:7070/v1/secrets/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"expected_version":1,"labels":{"additionalProperty":"example"},"value":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://ferritor.example.internal:7070/v1/secrets/example \ --header 'Content-Type: application/json' \ --data '{ "expected_version": 1, "labels": { "additionalProperty": "example" }, "value": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”path
required
string
A canonical secret path, slashes included (billing/db); its first segment is its namespace.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
A new version of a secret.
object
expected_version
Check-and-set: store only if the latest version is still this one; 0: only if the secret doesn’t exist yet.
integer | null format: int32
labels
Labels to set with this put (needs the label action too): plain
metadata, not encrypted.
object
key
additional properties
string
value
required
The value, standard base64 with padding (at most 1 MiB decoded).
string
Example generated
{ "expected_version": 1, "labels": { "additionalProperty": "example" }, "value": "example"}Responses
Section titled “Responses”The version stored.
Media typeapplication/json
One version of a secret, without its value.
object
created_at
required
string format: date-time
path
required
string
version
required
integer format: int32
Example generated
{ "created_at": "2026-04-15T12:00:00Z", "path": "example", "version": 1}default
Section titled “default”An error: see error.code.
Media typeapplication/json
Every error’s body.
object
error
required
object
code
required
Match on this, never on the message.
string
message
required
For people; may change.
string
Example
{ "error": { "code": "invalid_argument" }}