Updates a secret in the vault hierarchy. This endpoint handles three distinct operations — field-value update, rename, and move — determined by which fields are present in the request body. Only one operation should be performed per request.
Note: Only secrets (
entityType: secret) can be moved. Folder nodes (entityType: node) cannot be moved using this endpoint.
Update Field Values
To update the credential data of a secret, include a value map in the request body containing the field names and their new values as defined by the secret's template.
For dual-account secrets, use secondaryValue instead of value to update the secondary credential fields. Attempting to update value (primary fields) on a dual-account secret is not allowed and returns 400 "Updating secret primary field values not allowed for dual account". Conversely, providing secondaryValue when dual account is not enabled on the secret returns 400 "Can not update secondary secret field values as dual account is not enabled".
Versioning and rotation behaviour is controlled by two optional query parameters:
saveAsVersion=true— snapshots the current credential values as a new immutable version before applying the update. This allows the previous credential to be retrieved later via the versions endpoint. Defaults tofalse.syncToTarget=true— after saving, pushes the new credential to all mapped rotation target accounts via the Britive Broker. WhensyncToTargetis omitted or set tofalse, the target resources are not updated automatically and must be rotated separately.
For dual-account secrets, a successful syncToTarget sync triggers the Primary/Secondary account swap, alternating which account holds the active credential to ensure zero downtime during rotation.
Rename
To rename a secret, include the name field in the request body with the new name. The secret stays in its current folder; only its name changes.
- The new name must be unique within the same parent folder.
- Rename and move cannot be performed in the same request. If both
nameandpathare changed simultaneously, the request is rejected with400 "Not allowed to rename and move secret simultaneously."
Move (Secrets Only)
To move a secret to a different folder, include the path field in the request body with the full destination vault-relative path including the secret name. The path query parameter identifies the secret's current location; the path body field specifies where it should be moved to.
For example, to move my-secret from /folder1/subfolder1/my-secret to /folder1/my-secret, send:
PATCH /vault/{vaultId}/secrets?path=/folder1/subfolder1/my-secret
{ "path": "/folder1/my-secret" }
Path format rules — violation returns 400 "Invalid secret path : {path}":
- Must start with
/ - Must not contain
//(double slashes) - Must not end with
/(trailing slash) - The basename (last path segment) must equal the existing secret name — renaming and moving in the same request is not supported
Required permissions on the destination folder — violation returns 403 "Move not allowed due to missing permissions : {folder}":
sm.node.create— must be non-null and not Denysm.node.delete— must be non-null and not Deny
The destination parent folder must already exist in the vault; moving a secret to a non-existent folder is not supported.
vault Id
Current vault-relative path of the secret to update
Archive the existing credential as a new version before applying the update
Push the new credential to all mapped target accounts via the Broker
Update secret field values (standard secret)
{
"value": {
"url": "https://new-app.example.com",
"username": "admin",
"password": "new-p@ssw0rd"
}
}Update secondary credential values (dual-account secret only)
{
"secondaryValue": {
"username": "secondary-admin",
"password": "secondary-p@ssw0rd"
}
}Move secret to a new folder
{
"path": "/new/destination/my-secret"
}Read-only map of metadata field names to their plain-text values. Populated automatically from fields whose metadata flag is true in the static secret template. Changes to metadata fields do not trigger a new secret version.
Timestamp of the most recent verification attempt (scheduled or manual), read-only.
Outcome of the most recent verification attempt, read-only. Never In Progress — only stamped once a verification reaches a terminal state.
Vault-relative path of the secret. When included in a PATCH request body with a value that differs from the current path, triggers a move operation. Only secrets (entityType=secret) can be moved; folder nodes cannot. Must start with '/', must not contain '//', must not end with '/', and the basename must match the existing secret name (rename and move are mutually exclusive). The destination folder must exist and the caller must have sm.node.create and sm.node.delete permissions on it.
Secondary credential key-value map. Required only when dualAccount is true (Dual Account secrets).
When true the secret holds two sets of credentials (Primary in value and Secondary in secondaryValue) that alternate on each rotation cycle to ensure zero downtime.
Rotation target, notification, and secret verification settings embedded in a secret. Secret verification is decoupled from rotation but reuses targetData to identify the resource to check.
Notification medium IDs
The target resource and account a secret checks/rotates against, along with the optional rotation template the Broker executes. resource/accountDetails are required whenever targetData is supplied at all -- both rotation and secret verification (see verificationEnabled/verificationTemplate below) rely on them. rotationTemplate is required only to opt into rotation itself; a secret may supply targetData with verificationEnabled/verificationTemplate set and no rotationTemplate, in which case rotation simply stays unconfigured for that secret.
Identifier of the target resource. Must have rotation enabled in Resource Manager.
Account on the target resource that receives the updated credential
Account name on the target resource
Account identifier value
Defines the script/logic the Broker executes to update the credential on the target resource
Unique identifier of the rotation template
Human-readable name of the rotation template
Variables required by the rotation template. System-defined variables are populated automatically; user-defined variables must be supplied.
A single variable used by the rotation template
Variable name as referenced in the rotation script
True if populated automatically by the system; false if user-supplied
One or more values for this variable
Per-secret opt-in for secret verification ("Allow Verifications"). Requires targetData to be configured — cannot be true unless targetData is set.
The resource type's verification template (and per-secret variable values) this secret should be checked against. A resource type may have multiple verification templates, so templateId selects which one applies to this secret. Required — and validated for completeness (templateId, and at least one fully-populated templateVariable) — only when verificationEnabled is true; otherwise optional, and accepted as-is with no completeness checks (e.g. a caller may leave a previously-selected template in place while toggling verification off).
Unique identifier of the verification template
Human-readable name of the verification template
Variables required by the verification template. System-defined variables are populated automatically; user-defined variables must be supplied.
A single variable used by the verification template
Variable name as referenced in the verification script
True if populated automatically by the system; false if user-supplied
One or more values for this variable
Unit for the secret rotation interval. DAYS for static secrets, HOURS for dynamic secrets. Defaults to DAYS if not provided.
No content
Bad request. Returned for the following violations:
"Not allowed to rename and move secret simultaneously."— the request body changed bothnameandpathat the same time."Invalid secret path : {path}"— the destination path is malformed (missing leading/, contains//, ends with/, or the basename does not match the existing secret name)."Updating secret primary field values not allowed for dual account"—valuewas provided in the request body for a dual-account secret; usesecondaryValueinstead."Can not update secondary secret field values as dual account is not enabled"—secondaryValuewas provided but the secret does not have dual account enabled.SM-0178—rotationIntervalin hours is not a valid multiple of the vault'sdynamicRotationIntervalHours(whenrotationIntervalUnitisHOURS).SM-0179— Hourly rotation is not allowed when the vault'sdynamicRotationIntervalHoursis24.SM-0180— Hourly rotation interval is not allowed for static secrets.
Forbidden. Returned when the caller does not have the required permissions on the destination folder.
"Move not allowed due to missing permissions : {folder}"— the caller is missingsm.node.createorsm.node.delete(or both) on the destination folder.