Update Api Key
update_api_keyChange an API key's active status, expiry, spend limit, reset interval, or IP allowlist. Only supplied fields update, so you can disable, re-enable, or restrict access without replacing the key.
Instructions
Change an API key: disable or re-enable it, or change its expiry, spend limit, reset window or IP allowlist. Only the given fields change. ADMIN keys can be changed only in the dashboard. Needs an ADMIN key. If key management is turned off on this server, nothing changes and the result gives the dashboard link instead.
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": "update_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| active | No | False disables the key, True enables it again | |
| key_id | Yes | The key's numeric id (see list_api_keys) | |
| expires_at | No | When the key stops working, YYYY-MM-DD. Optional | |
| spend_limit | No | Spend cap in USD for each reset window. Optional | |
| ip_whitelist | No | IP addresses or CIDR ranges allowed to use the key | |
| reset_interval | No | How often the spend counter resets. Optional |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||