rotate_key
Rotate an API key, optionally keeping the old key valid for up to 1,440 minutes.
Creates a new key with the same name, scopes, and rate limits. The new key is returned once — store it immediately.
Requires: API key with write scope.
Args: key_id: UUID of the API key to rotate (get from whoami())
Returns: {"api_key": "bh_...", "key_id": "uuid", "prefix": "bh_...", "scopes": ["read", "write"], "message": "Key rotated. Store securely."}
Expiry and all restrictions are preserved. Without a grace period the old key stops working immediately.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key_id": "<key_id>"
},
"name": "rotate_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key_id | Yes | ||
| grace_minutes | No |