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

# Update Proxy Whitelist

> Sets the whitelisted IP addresses authorized for a proxy server.

`Whitelist Authentication` is a method of restricting access to a proxy server based on the client's `IP address`. This is a useful method of restricting access to a proxy server to only those who need it.

By default, all proxies upon deployment utilize a randomly generated basic authorization in the format of `username:password`. You can disable this basic authorization by updating the proxy's whitelisted IPs authorized to access the proxy server.

<Info>Basic authorization will be disabled upon successfully updating whitelist authorization.</Info>


## OpenAPI

````yaml PATCH /v1/proxies/auth/whitelist/{proxyName}
openapi: 3.0.1
info:
  title: Illusory API Reference
  description: Interact with Illusory proxies
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://cmd.illusory.io
security: []
paths:
  /v1/proxies/auth/whitelist/{proxyName}:
    patch:
      description: Sets the whitelisted IP addresses authorized for a proxy server.
      parameters:
        - name: proxyName
          in: path
          description: Replace `{proxyName}` in the url path with `YOUR_PROXY`.
          required: true
          schema:
            type: string
      requestBody:
        description: Whitelist authentication details
        content:
          application/json:
            schema:
              type: object
              properties:
                authorize_ip:
                  type: string
                  description: >-
                    Set the IP address to authorize. Use commas to specify
                    multiple IP addresses. e.g.
                    `123.123.23,456.456.56/24,789.789.89`.
                  example: 123.123.23,456.456.56/24,789.789.89
              required:
                - authorize_ip
      responses:
        '200':
          description: Server response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    description: Indicates whether the request was successful e.g., `true`
                  message:
                    type: string
                    description: Success message
                    example: Successfully updated and enabled the whitelist IP(s).
                  data:
                    $ref: '#/components/schemas/proxy-basic-whitelist'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    proxy-basic-whitelist:
      type: object
      properties:
        proxy_name:
          type: string
          description: Unique identifier of the proxy server
          example: ILL-US-AU1-9999
        last_auth_change:
          type: string
          format: date-time
          description: Timestamp of when the proxy authentication was updated
          example: '2050-12-04T17:43:16.407+00:00'
        whitelist:
          type: string
          description: List of whitelisted IP addresses or domains
          example: 123.123.23,456.456.56/24,789.789.89
    Error:
      type: object
      properties:
        ok:
          type: boolean
          description: Indicates the request was unsuccessful e.g., `false`
        data:
          type: object
          description: Additional error data
          properties:
            proxy_name:
              type: string
              description: Unique identifier of the proxy server
        message:
          type: string
          description: Error message
      example:
        ok: false
        data:
          proxy_name: ILL-US-AU1-9999
        message: Proxy not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: apiKey
      description: >-
        The `Authorization` header is used to authenticate with the API using
        your `Master` API key. Value is of the format `Bearer YOUR_KEY_HERE`.

````