Replace a secret's value or note, or a sign-in's site.

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. A sign-in's targets (its one https site) can change on its own, keeping the stored username and password, but only by the person who added it, signed in as themselves. Any other field but description is refused with SECRET_FIELD_IMMUTABLE. A body that is not a JSON object is 400 INVALID_BODY.

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
targetsarray of stringoptional

A sign-in's new site, such as https://login.example.com.

descriptionstringoptional
at most 500 characters

Responses

200Updated.
dataSecretrequired

A secret without its value.

14 fields
idstringrequired
Format uuid
namestringrequired
kindstringrequired
One ofenvheaderlogin
sourcestringrequired

Where the value lives; a 1Password secret holds only its reference.

One ofrushonepassword
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
400A body that is not a JSON object (INVALID_BODY).
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
401No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
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
403Not its creator or an org admin, or a new site from anyone but the person who added the sign-in.
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
409SECRET_CHANGED: a site-only move found the value replaced since it was read; read it again.
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
429The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED).

The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED). The error names the limit. Wait Retry-After seconds.

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