Replace a secret's value or note.

PATCH/o/{org}/secrets/{secret}
View .md

Only its creator or an org admin. A sign-in's value is username, password and an optional totp_secret, replaced together; any other secret's is value. Any other field but description is refused with SECRET_FIELD_IMMUTABLE.

Authenticate with a signed-in session token (an API key cannot call this route).

Path parameters

orgstringrequired

The org's slug or id. A caller with no role in the org gets 404.

secretstringrequired
Format uuid

Request body

valuestringoptional
at most 32768 characters
usernamestringoptional
at most 1024 characters
passwordstringoptional
at most 1024 characters
totp_secretstringoptional
descriptionstringoptional
at most 500 characters

Responses

200Updated.
dataSecretrequired

A secret without its value.

13 fields
idstringrequired
Format uuid
namestringrequired
kindstringrequired
One ofenvheaderlogin
descriptionstringrequired
project_idstringrequired
Format uuid
targetsarray of stringrequired

Hosts (header) or one origin (login); empty for env.

header_namestring | nulloptional
header_formatstring | nulloptional
has_totpbooleanrequired
created_bystring | nullrequired

Null once the member who added it has deleted their account; the secret stays with the Project.

Format uuid
created_atstringrequired
Format date-time
value_updated_atstringrequired
Format date-time
last_used_atstring | nulloptional
Format date-time
403Not its creator or an org admin.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
404SECRET_NOT_FOUND: no such secret the caller can see.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
422SECRET_FIELD_IMMUTABLE, SECRET_VALUE_INVALID or SECRET_DESCRIPTION_INVALID.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional