# lg_gateway_keys_update: Lower a key's limits or disable it

Change an inference key: rename it, lower a limit or the rate limit, or disable it. Raising or removing a limit and re-enabling are done by a person in the web app.

- **Changes data:** yes
- **Credential scope:** `gateway:write` (an API key's scopes, or what you allowed when connecting with OAuth)
- **Assistant level:** an assistant at Full; a lower level is refused

## Inputs

| Field | Type | Required | Notes |
|---|---|---|---|
| `id` | string | yes |  |
| `body` | object (name, limit_total_usd, limit_daily_usd, limit_monthly_usd, rate_limit_rpm, byok_fallback, disabled) | no |  |
| `body.name` | string | no |  |
| `body.limit_total_usd` | string or number or null | no |  |
| `body.limit_daily_usd` | string or number or null | no |  |
| `body.limit_monthly_usd` | string or number or null | no |  |
| `body.rate_limit_rpm` | integer or null | no |  |
| `body.byok_fallback` | boolean | no |  |
| `body.disabled` | boolean | no |  |

## Example MCP call

A `tools/call` request to `https://manage.restolayer.com/mcp`:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lg_gateway_keys_update",
    "arguments": {
      "id": "gk_01jabcdefghjkmnpqrstvwxyz0",
      "body": {
        "limit_daily_usd": "0.50"
      }
    }
  }
}
```

## Example REST call

The same thing over REST (`PATCH /v1/gateway-keys/:id`):

```bash
curl -s -X PATCH "https://manage.restolayer.com/v1/gateway-keys/gk_01jabcdefghjkmnpqrstvwxyz0" \
  -H "Authorization: Bearer $LG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit_daily_usd":"0.50"}'
```

All tools: [MCP tools](https://www.restolayer.com/docs/mcp/tools). Connecting: [connect your assistant](https://www.restolayer.com/docs/connect).
