> ## Documentation Index
> Fetch the complete documentation index at: https://www.kernel.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update proxy by ID

> Update a proxy's name, or move an ISP proxy to another reserved exit IP. Proxy names are not unique and duplicate names are allowed. Moving requires a reserved ISP allocation and is accepted only for proxies of type isp: the new endpoint is probed first and nothing changes if the probe fails. An IP outside the allocation is a 400 with code ip_not_reserved. A 409 means the IP cannot currently be assigned or the proxy was changed concurrently; read it back and retry.



## OpenAPI

````yaml https://api.onkernel.com/spec.json patch /proxies/{id_or_name}
openapi: 3.1.0
info:
  description: Developer tools and cloud infrastructure for AI agents to use web browsers
  title: Kernel API
  version: 0.1.0
servers:
  - description: API Server
    url: https://api.onkernel.com
security:
  - bearerAuth: []
tags:
  - description: Search the web and retrieve content for selected results.
    name: Search
  - description: Create and manage browser sessions.
    name: Browsers
  - description: Control mouse, keyboard, and screen on the browser instance.
    name: Browser Computer Controls
  - description: >-
      Execute Playwright code against the browser instance and manage the
      executors it runs in.
    name: Browser Playwright
  - description: Execute JavaScript in the browser instance's persistent Browser REPL.
    name: Browser REPL
  - description: Discover and invoke native page tools across the browser instance.
    name: Browser WebMCP
  - description: Read, write, and manage files on the browser instance.
    name: Browser Filesystem
  - description: Execute and manage processes on the browser instance.
    name: Browser Processes
  - description: Record and manage browser session video replays.
    name: Browser Replays
  - description: Stream logs from the browser instance.
    name: Browser Logs
  - description: >-
      Stream live telemetry events from a browser session, and manage the
      destinations sessions export them to.
    name: Browser Telemetry
  - description: Create, list, retrieve, and delete browser profiles.
    name: Profiles
  - description: Create and manage proxy configurations for routing browser traffic.
    name: Proxies
  - description: Create, list, retrieve, and delete browser extensions.
    name: Extensions
  - description: Create and manage browser pools for acquiring and releasing browsers.
    name: Browser Pools
  - description: Inspect the identity and authorization context for the current request.
    name: Authentication
  - description: >-
      Create and manage auth connections for automated credential capture and
      login.
    name: Managed Auth
  - description: Create and manage credentials for authentication.
    name: Credentials
  - description: Configure external credential providers like 1Password.
    name: Credential Providers
  - description: List applications and versions.
    name: Apps
  - description: Create and manage app deployments and stream deployment events.
    name: Deployments
  - description: Invoke actions and stream or query invocation status and events.
    name: Invocations
  - description: Read and manage organization-level limits.
    name: Organization
  - description: Create and manage projects for resource isolation within an organization.
    name: Projects
  - description: Create and manage API keys for organization and project-scoped access.
    name: API Keys
  - description: Read audit log records for the authenticated organization.
    name: Audit Logs
  - description: Resolve browser and proxy recommendations for bot-protected sites.
    name: Config Registry
paths:
  /proxies/{id_or_name}:
    patch:
      tags:
        - Proxies
      summary: Update proxy by ID
      description: >-
        Update a proxy's name, or move an ISP proxy to another reserved exit IP.
        Proxy names are not unique and duplicate names are allowed. Moving
        requires a reserved ISP allocation and is accepted only for proxies of
        type isp: the new endpoint is probed first and nothing changes if the
        probe fails. An IP outside the allocation is a 400 with code
        ip_not_reserved. A 409 means the IP cannot currently be assigned or the
        proxy was changed concurrently; read it back and retry.
      operationId: patchProxiesById
      parameters:
        - description: Proxy ID. Name-based addressing is supported only for retrieval.
          in: path
          name: id_or_name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProxyUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Proxy'
          description: Proxy updated
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth: []
components:
  schemas:
    ProxyUpdateRequest:
      description: At least one of name or config must be provided.
      properties:
        config:
          description: Type-specific changes. Only ISP proxies accept a config update.
          oneOf:
            - $ref: '#/components/schemas/IspProxyUpdateConfig'
        name:
          description: >-
            New proxy name. Proxy names are trimmed and length-checked only;
            duplicates are allowed because proxies are updated by ID, not by
            name.
          example: my-renamed-proxy
          maxLength: 255
          minLength: 1
          type: string
      type: object
    Proxy:
      description: Configuration for routing traffic through a proxy.
      discriminator:
        mapping:
          custom: '#/components/schemas/CustomProxyConfig'
          datacenter: '#/components/schemas/DatacenterProxyConfig'
          isp: '#/components/schemas/IspProxyConfig'
          mobile: '#/components/schemas/MobileProxyConfig'
          residential: '#/components/schemas/ResidentialProxyConfig'
        propertyName: type
      properties:
        bypass_hosts:
          description: Hostnames that should bypass the parent proxy and connect directly.
          items:
            type: string
          type: array
        config:
          description: Configuration specific to the selected proxy `type`.
          oneOf:
            - $ref: '#/components/schemas/DatacenterProxyConfig'
            - $ref: '#/components/schemas/IspProxyConfig'
            - $ref: '#/components/schemas/ResidentialProxyConfig'
            - $ref: '#/components/schemas/MobileProxyConfig'
            - $ref: '#/components/schemas/CustomProxyConfig'
          x-stainless-override-schema:
            oneOf:
              - $ref: '#/components/schemas/IspProxyConfig'
              - $ref: '#/components/schemas/ResidentialProxyConfig'
              - $ref: '#/components/schemas/MobileProxyConfig'
              - $ref: '#/components/schemas/CustomProxyConfig'
        id:
          type: string
        ip_address:
          description: IP address that the proxy uses when making requests.
          example: 192.168.1.1
          type: string
        last_checked:
          description: Timestamp of the last health check performed on this proxy.
          format: date-time
          type: string
        name:
          description: Readable name of the proxy.
          type: string
        protocol:
          default: https
          description: Protocol to use for the proxy connection.
          enum:
            - http
            - https
          type: string
        status:
          description: Current health status of the proxy.
          enum:
            - available
            - unavailable
          type: string
        type:
          description: >
            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.
          enum:
            - datacenter
            - isp
            - residential
            - mobile
            - custom
          type: string
          x-stainless-override-schema:
            enum:
              - isp
              - residential
              - mobile
              - custom
            type: string
      required:
        - type
      type: object
    IspProxyUpdateConfig:
      description: >-
        Changes to an ISP proxy's exit IP. Accepted only for proxies of type
        `isp`.
      properties:
        ip_address:
          description: >-
            Reserved exit IP to move the proxy to. The IP must be active in the
            organization's allocation and in the proxy's country. The proxy
            keeps its ID. The new endpoint is probed before anything changes; a
            failed probe leaves the proxy as it was. Live browsers open new
            connections on the new IP within a few seconds; established
            connections drain on the old one.
          example: 203.0.113.10
          minLength: 1
          type: string
      required:
        - ip_address
      title: ISP
      type: object
    CustomProxyConfig:
      description: Configuration for a custom proxy (e.g., private proxy server).
      properties:
        has_ca_bundle:
          description: Whether the proxy has a custom CA bundle configured.
          example: true
          type: boolean
        has_password:
          description: Whether the proxy has a password.
          example: true
          type: boolean
        host:
          description: Proxy host address or IP.
          example: 127.0.0.1
          type: string
        port:
          description: Proxy port.
          example: 8080
          type: integer
        username:
          description: Username for proxy authentication.
          example: user123
          type: string
      required:
        - host
        - port
      title: Custom
      type: object
    DatacenterProxyConfig:
      deprecated: true
      description: >-
        Configuration for a deprecated datacenter proxy. Use an ISP proxy
        instead.
      properties:
        country:
          description: ISO 3166 country code. Defaults to US if not provided.
          example: US
          type: string
      title: Datacenter
      type: object
      x-deprecated-reason: Use an ISP proxy instead.
    IspProxyConfig:
      description: Configuration for an ISP proxy.
      properties:
        country:
          description: >-
            ISO 3166 country code. Supported countries are US, GB, FR, DE, SG,
            and KR. Defaults to US if not provided, or to the country of
            ip_address when that is set.
          example: US
          type: string
        ip_address:
          description: >-
            Reserved exit IP to pin the proxy to. Available only to
            organizations with a reserved ISP allocation; the IP must be active
            in it (see GET /proxy_ips) and, when country is also set, in that
            country. Omit to let Kernel choose an IP. A proxy read includes it
            only when the proxy's primary exit IP is one of the organization's
            reserved IPs; every ISP proxy's exit IP is on the top-level
            ip_address. An IP outside the allocation is rejected with code
            ip_not_reserved; one that cannot currently be assigned, with 409
            ip_unavailable.
          example: 203.0.113.10
          minLength: 1
          type: string
      title: ISP
      type: object
    MobileProxyConfig:
      description: Configuration for mobile proxies.
      properties:
        city:
          description: >-
            Provider city alias. Mobile carrier routing can make observed geo
            vary.
          example: brooklyn
          type: string
        country:
          description: >-
            ISO 3166 country code. If omitted, the proxy uses the global pool
            without country targeting.
          example: US
          type: string
        state:
          description: >-
            US-only state code. Mobile carrier routing can make observed geo
            vary.
          example: NY
          type: string
      title: Mobile
      type: object
    ResidentialProxyConfig:
      description: Configuration for residential proxies.
      properties:
        asn:
          description: >-
            Autonomous system number. See
            https://bgp.potaroo.net/cidr/autnums.html
          example: AS15169
          type: string
        city:
          description: >-
            City name (no spaces, e.g. `sanfrancisco`). If provided, `country`
            must also be provided.
          example: sanfrancisco
          type: string
        country:
          description: >-
            ISO 3166 country code. If omitted, the proxy uses the global pool
            without country targeting.
          example: US
          type: string
        os:
          deprecated: true
          description: Operating system of the residential device.
          enum:
            - windows
            - macos
            - android
          type: string
          x-deprecated-reason: os selection not supported by proxy provider
        state:
          description: Two-letter state code.
          example: CA
          type: string
        zip:
          description: US ZIP code.
          example: '94107'
          type: string
      title: Residential
      type: object
    Error:
      properties:
        code:
          description: Application-specific error code (machine-readable)
          example: bad_request
          type: string
        details:
          description: Additional error details (for multiple errors)
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
        inner_error:
          $ref: '#/components/schemas/ErrorDetail'
        message:
          description: Human-readable error description for debugging
          example: 'Missing required field: app_name'
          type: string
      required:
        - code
        - message
      type: object
    ErrorDetail:
      properties:
        code:
          description: Lower-level error code providing more specific detail
          example: invalid_input
          type: string
        message:
          description: Further detail about the error
          example: Provided version string is not semver compliant
          type: string
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Bad Request – invalid input
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Unauthorized – missing or invalid authorization token
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Forbidden – insufficient permissions or plan
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Resource not found
    Conflict:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Conflict – resource already exists
    InternalError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Internal Server Error
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.