Rotate an API credential
credentials_rotateReplaces a credential with a new one and gives the original a deadline, so consumers can pick up the new secret before the old stops working. The replacement is a new credential with its own identifier and the same authority and scopes; the original keeps working until it expires, then refuses with credential_expired rather than credential_revoked. overlapSeconds may only shorten the window — the default is also the maximum — and zero retires the original immediately. The new secret is in this response and in no other. Some calls need more: credentials:administer is required as well when the target was not created by the caller, and the call is refused scope_missing without it.
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": {
"credentialId": "<credentialId>"
},
"name": "credentials_rotate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| credentialId | Yes | The `credentialId` this operation acts on. | |
| overlapSeconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| retired | Yes | ||
| credential | Yes |