update_api_key
Modify an existing API key's name, description, scopes, defaults, limits, or rotation policy without rotating the secret; serialize concurrent limit updates to prevent overwrite.
Instructions
Update an API key's name, description, scopes, defaults, or limits, unlike delete_api_key which revokes it or create_api_key which issues a new one. Changes take effect immediately for downstream callers, type and sub-type stay fixed after creation, and the call returns success without rotating the secret. Limit updates read the current limits and write them back, and Portkey has no conditional writes, so concurrent limit updates to the same resource can overwrite each other. Serialize them.
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": {
"id": "<id>"
},
"name": "update_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The UUID of the API key to update | |
| name | No | New display name for the key | |
| scopes | No | New permission scopes for the key | |
| expires_at | No | New expiration date in ISO 8601 format, or null to remove expiration | |
| description | No | New description for the key | |
| rate_limits | No | Replacement request or token rate limits, or null to clear | |
| reset_usage | No | Set to true to reset current usage; an exhausted key returns to active | |
| alert_emails | No | New email addresses for alerts | |
| credit_limit | No | New credit limit for usage | |
| rate_limit_rpm | No | New rate limit in requests per minute | |
| alert_threshold | No | New alert threshold percentage (0-100) | |
| rotation_policy | No | Replacement rotation policy, or null to disable it | |
| default_metadata | No | New default metadata key-value pairs | |
| default_config_id | No | New default configuration ID | |
| default_allow_config_override | No | Whether callers may override the key's default config |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Call succeeded | |
| data | No | Success payload | |
| error | No | Failure details |