Skip to main content
PATCH
JavaScript
Rotate a workspace secret without changing where it is referenced. Every adapter that names ${THIS_SECRET} picks up the new value at the next call, no reconfiguration.
The new value takes effect immediately. The old one stops resolving.

You rotate blind

spec.value is write-only, so the response and every later read redact it to "". You cannot read the value back to check the rotation landed. Confirm it a different way: watch a tool call that uses the secret succeed, or check resolvedSecrets on a tool call to see the scope resolved.
Because you cannot read the old value, keep it in your own secret manager if you need a rollback. Cadenya holds it only to resolve at call time.

The value is a zero-value-safe field

A non-empty new value lands through a plain merge; updateMask is not required to rotate:
You would only reach for updateMask to set an empty value, which is rarely what you want for a secret. To rename, send metadata.name; the merge leaves the value untouched.

Create a workspace secret

Storing the value, and the three-scope precedence.

Store and use secrets

Where ${NAME} resolves, and the rotation cutover.

Get a tool call

resolvedSecrets, the way to confirm a secret resolved.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required

The workspace the secret belongs to.

Example:

"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"

id
string
required

The secret to update.

Example:

"wsecret_01HXKD2E5NQM3T9AYWCF586W5A"

Body

application/json
metadata
object

UpdateResourceMetadata contains the user-provided fields for updating a workspace-scoped resource. Read-only fields (id, account_id, workspace_id, profile_id, created_at) are excluded since they are set by the server.

spec
object
updateMask
string<field-mask>

Fields to update.

Response

OK

metadata
object
required

Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

spec
object
required
info
object

Workspace secret information