---
title: "Update Proxy Key"
method: POST
path: "/auth/proxy/update"
---

# Update Proxy Key

`POST /auth/proxy/update`

Update an existing proxy key's configuration. Replaces the legacy `POST /auth/proxy/update/{proxy_key}`; the proxy key identifier is sent in the request body so the URL is static.

## Request body

- UpdateProxyKeyRequest
  - `proxy_key` string, required — The proxy key to update (must be one you own)
  - `name` string, required — Name of the proxy key
  - `expires_at` integer, required — Expiration timestamp in seconds (-1 for no expiration)
  - `allocated_ammount` number, required — Allocated credit amount
  - `limit_type` 'daily' | 'weekly' | 'monthly' — Spend window for the allocation
  - `model_whitelist` string[] — List of allowed models (empty for all models)
  - `ip_whitelist` string[] — List of allowed IP addresses or CIDR blocks (empty for all IPs)

## Response `200`

Proxy key updated successfully

- object
  - `message` string

## Other responses

- `401` — Missing, invalid, or non-API-key Authorization header
- `403` — Proxy key is owned by a different account
- `404` — Proxy key not found

---

[API](https://skmtc.dev/electronhub/apis/electron-hub-api.md) · [All operations](https://skmtc.dev/electronhub/apis/electron-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/electronhub/electron-hub-api/revisions/727f9c51555b/schema)
