> ## Documentation Index
> Fetch the complete documentation index at: https://developer.plugchoice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Proxy Servers

Updates the proxy server configuration for the specified charger. There must be exactly one leader across the vendor role and all server entries.

<ParamField path="charger" type="string" required>
  The UUID of the charger.
</ParamField>

<ParamField body="vendor_role" type="string" required>
  The role of the vendor (Plugchoice) connection. Either `ROLE_LEADER` or `ROLE_FOLLOWER`.
</ParamField>

<ParamField body="servers" type="object[]">
  An array of proxy server configurations.

  <Expandable title="server">
    <ParamField body="servers[].websocket" type="string" required>
      The WebSocket URL of the proxy server. Must use `ws://` or `wss://` protocol.
    </ParamField>

    <ParamField body="servers[].role" type="string" required>
      The role of this server. Either `ROLE_LEADER` or `ROLE_FOLLOWER`.
    </ParamField>

    <ParamField body="servers[].password" type="string | null">
      Optional credential the charger uses to authenticate to this server. Stored encrypted at rest and never returned by the API.

      Three-state semantics:

      * **Omit the field** to preserve the password currently stored for this server (matched by `websocket`).
      * Pass a **non-empty string** to set or replace the password.
      * Pass `null` (or an empty string) to clear the stored password.

      This means partial updates from a UI that does not know existing passwords (e.g. only changing a role) will not wipe credentials.
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="data" type="object[]">
  The updated list of proxy server entries.

  <Expandable title="proxy server">
    <ResponseField name="websocket_url" type="string">
      The WebSocket URL of the proxy server.
    </ResponseField>

    <ResponseField name="role" type="string">
      The role of this server.
    </ResponseField>

    <ResponseField name="has_password" type="boolean">
      Whether a password is currently stored for this server. The password value itself is never returned.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of when the proxy entry was created.
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp of when the proxy entry was last updated.
    </ResponseField>
  </Expandable>
</ResponseField>
