VocalDocscontracts 1.65.0

Rotate the Organization's tool signing secret

POST /v1/tool-signing-secret/rotate

PropertyValue
Operationrotate_tool_signing_secret
GroupTools
Scopetools:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited tool_signing_secret.rotate (mutation)
Released in1.49.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Mints a new tool signing secret and answers it once. The previous secret keeps signing beside it for previous_secret_expires_in_s (86,400 by default), so every http Tool request in the window carries two v1 values, the new one first; rotating again inside the window retires the oldest. A replay under the same Idempotency-Key rotates nothing and answers secret null.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the tools:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/tool-signing-secret/rotate" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Request body

Content type application/json, required: ToolSigningSecretRotateRequest.

FieldTypeRequiredDescription
previous_secret_expires_in_sintegernoHow long the previous secret keeps signing beside the new one, 0 to 604,800 seconds; 86,400 when omitted. 0 retires it at once.

Responses

StatusContent typeShapeError codes
200application/jsonToolSigningSecretRotation
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
409application/jsonErrorEnvelopeidempotency_in_progress, idempotency_key_reused
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is ToolSigningSecretRotation.

FieldTypeRequiredDescription
object"tool_signing_secret_rotation"yes
previous_secret_expires_atTimestamp or nullyesWhen the previous secret stops signing, or null when none does.
previous_secret_hintstring or nullyesThe last four characters of the secret that keeps signing through the window, or null when none does.
rotated_atTimestampyes
secretToolSigningSecret or nullyesThe new secret, shown in this answer only; null in the answer to a replay under the same Idempotency-Key, which rotated nothing.
secret_hintstringyesThe last four characters of the new secret.