---
title: "Rename proxy by ID"
method: PATCH
path: "/proxies/{id_or_name}"
tags: ["Proxies"]
---

# Rename proxy by ID

`PATCH /proxies/{id_or_name}`

## Request

- Base URL: `https://api.onkernel.com`
- URL: `https://api.onkernel.com/proxies/{id_or_name}`
- Auth: HTTP bearer

Update a proxy's name. Proxy names are not unique and duplicate names are allowed.

## Path parameters

- `id_or_name` string, required

## Request body

- ProxyUpdateRequest
  - `name` string, required: New proxy name. Proxy names are trimmed and length-checked only; duplicates are allowed because proxies are updated by ID, not by name.

## Response `200`

Proxy updated

- Proxy: Configuration for routing traffic through a proxy.
  - `bypass_hosts` string[]: Hostnames that should bypass the parent proxy and connect directly.
  - `config` union: Configuration specific to the selected proxy `type`.
    - object: Configuration for a deprecated datacenter proxy. Use an ISP proxy instead.
      - `country` string: ISO 3166 country code. Defaults to US if not provided.
    - object: Configuration for an ISP proxy.
      - `country` string: ISO 3166 country code. Supported countries are US, GB, FR, DE, SG, and KR. Defaults to US if not provided.
    - object: Configuration for residential proxies.
      - `asn` string: Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
      - `city` string: City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be provided.
      - `country` string: ISO 3166 country code. If omitted, the proxy uses the global pool without country targeting.
      - `os` 'windows' | 'macos' | 'android': Operating system of the residential device.
      - `state` string: Two-letter state code.
      - `zip` string: US ZIP code.
    - object: Configuration for mobile proxies.
      - `city` string: Provider city alias. Mobile carrier routing can make observed geo vary.
      - `country` string: ISO 3166 country code. If omitted, the proxy uses the global pool without country targeting.
      - `state` string: US-only state code. Mobile carrier routing can make observed geo vary.
    - object: Configuration for a custom proxy (e.g., private proxy server).
      - `has_ca_bundle` boolean: Whether the proxy has a custom CA bundle configured.
      - `has_password` boolean: Whether the proxy has a password.
      - `host` string, required: Proxy host address or IP.
      - `port` integer, required: Proxy port.
      - `username` string: Username for proxy authentication.
  - `id` string
  - `ip_address` string: IP address that the proxy uses when making requests.
  - `last_checked` string, date-time: Timestamp of the last health check performed on this proxy.
  - `name` string: Readable name of the proxy.
  - `protocol` 'http' | 'https': Protocol to use for the proxy connection.
  - `status` 'available' | 'unavailable': Current health status of the proxy.
  - `type` 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom', required: Proxy type to use. In terms of quality for avoiding bot-detection, from best to worst: `mobile` > `residential` > `isp`. `datacenter` is deprecated; use `isp` instead. Existing datacenter proxies remain supported.

## Other responses

- `400`: Bad Request – invalid input
- `401`: Unauthorized – missing or invalid authorization token
- `404`: Resource not found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/kernel/apis/kernel-api.md) - [All operations](https://skmtc.dev/kernel/apis/kernel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kernel/apis/kernel-api/revisions/0f6cf4f58fe6?raw)
