Skip to navigation

Update a secret

View as Markdown

Change some fields of a Secret; null clears one. Creates a new version. Supports If-Match.

Authentication

AuthorizationBearer

Use Bearer <api-key>.

Path parameters

secretstringRequired
Unique secret identifier generated by BCTRL.

Headers

BCTRL-VersionenumOptional
Dated API version. Defaults to the release pinned when the API key was created.
Allowed values:
BCTRL-SpacestringOptional
Select one authorized Space by its opaque ID or unique name. Omission uses the operation default.
BCTRL-Subaccount-IdstringOptional
Optional effective subaccount context for organization API keys. Subaccount API keys are already scoped and cannot use this header to act as another subaccount.
If-MatchstringOptional

Apply the write only if the current version (the ETag) is this one, for example "3". Returns 412 otherwise.

Idempotency-KeystringOptional1-200 characters

Optional retry key for this billable operation. Reusing the same key with the same request replays its stable outcome; credential-bearing results may be freshly issued for the same principal. Reusing it with a different request returns 409.

Request

Change some fields; null clears one. Creates a new version.

fromVersionintegerOptional

Restore values of this version; send alone.

labelstring or nullOptional<=512 characters
notesstring or nullOptional1-16384 characters
originslist of stringsOptional

Origins a login may be filled into: https://host[:port], or https://*.host for any subdomain.

passwordstring or nullOptional1-4096 characters
totpstring or nullOptional1-1024 characters
usernamestring or nullOptional<=512 characters
valuestring or nullOptional1-65536 characters

Response headers

BCTRL-Request-IdstringOptional
Current request identifier, also echoed in errors.
BCTRL-VersionstringOptional
Negotiated dated API version.
RateLimit-Limitinteger

Evaluated policy limit; zero when no finite policy was evaluated.

RateLimit-Remaininginteger

Remaining policy budget; zero when no finite policy was evaluated.

RateLimit-Resetinteger

Seconds until reset; zero when no finite policy was evaluated.

Response

OK
createdAtdatetime
RFC 3339 timestamp with a UTC offset.
hasNotesboolean
hasPasswordboolean
hasTotpboolean
hasValueboolean
idstring
Unique secret identifier generated by BCTRL.
labelstring or null
lastUsedAtdatetime or null
RFC 3339 timestamp with a UTC offset.
object"secret"
originslist of strings

Origins a login may be filled into: https://host[:port], or https://*.host for any subdomain.

pathstring1-512 characters

Secret path, for example prod/github/bot. May contain /.

subaccountIdstring or null1-64 characters

The owning subaccount, or null for an organization-wide secret.

typeenum

login: username, password and TOTP seed for a site. value: one opaque value.

Allowed values:
updatedAtdatetime
RFC 3339 timestamp with a UTC offset.
usernamestring or null

Not secret; readable.

versioninteger

Current version; the ETag of the secret.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
412
Precondition Failed Error
429
Too Many Requests Error