Set an API key's allowed IPs
update_api_keySets or clears the IP allowlist of a runtime API key: allowed_ips replaces the list, and null or [] clears it. Each entry is an IP address or CIDR range (for example 203.0.113.7 or 198.51.100.0/24). Public addresses only, up to 100 entries, ranges no wider than /8 (IPv4) or /16 (IPv6). An empty list accepts calls from any IP. Calls from any other address get 403 with code ip_not_allowed. A change takes up to a minute to apply. A key held by an agent login cannot have a list. Requires the apikeys:write scope. Only API keys owned by the signed-in user can be changed. call_model with a restricted key is refused unless its list includes the address the MCP client connects from.
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": {
"allowed_ips": "<allowed_ips>",
"id": "<id>",
"uuid": "<uuid>"
},
"name": "update_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Runtime API key id | |
| uuid | Yes | Project UUID | |
| allowed_ips | Yes | Replaces the key's allowlist; null or [] clears it so the key accepts any IP. IP addresses or CIDR ranges the key accepts calls from (for example 203.0.113.7 or 198.51.100.0/24). Public addresses only; up to 100 entries; ranges no wider than /8 for IPv4 or /16 for IPv6. Empty accepts any IP. Calls from any other address get 403 ip_not_allowed. A change takes up to a minute to apply. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | No | Empty for a single resource. Endpoint-specific context appears here rather than as a sibling of `data`. |