Replace a key with its twin (same kind, mode, scopes, label).
rotate_keyReplace a key with its twin (same kind, mode, scopes, label). The old key keeps working until replaced.expires_at so a deploy can swap values without a gap. Needs the keys scope even to rotate itself — rotate a scoped key with a full key or from the dashboard. A key is rotated once: rotating it again is a 409 key_already_rotated, and during its grace the old key cannot mint, rotate, revoke or read deliveries (403 key_rotated). A test key cannot rotate a live key (403 mode_mismatch). Scope: keys.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "rotate_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Which key. Default: the key making this call. | |
| grace_hours | No | 0 revokes the old key immediately. |