Skip to main content
PATCH
JavaScript
Rotate a tool set secret without changing where it is referenced. Every tool in this set that names ${THIS_SECRET} picks up the new value at the next call.
The new value takes effect at once, and the old one stops resolving. Like every secret, spec.value is write-only: you cannot read it back to confirm the rotation, so verify by watching a tool call that uses it succeed, or check resolvedSecrets on the tool call. A non-empty value lands through a plain merge; updateMask is not needed to rotate. Send metadata.name to rename. Rotating a tool set secret changes only this tool set’s copy. It does not touch a workspace secret of the same name, which other tool sets still resolve.

Get a tool set secret

Confirm it exists after rotating.

Update a workspace secret

Rotate the workspace-wide equivalent.

Store and use secrets

Scopes and rotation.

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 that owns the tool set.

Example:

"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"

toolSetId
string
required

The tool set the secret belongs to. Accepts the canonical ts_… form or the external_id: form.

Example:

"toolset_01HXKD2E5NQM3T9AYWCFNRMN74"

id
string
required

The secret to update.

Example:

"toolsecret_01HXKD2E5NQM3T9AYWCF8PWC4R"

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

Tool set secret information