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

# Change proxy protocol

> Switch a proxy between HTTP and SOCKS5 protocols.

Changes the protocol of a provisioned proxy by calling the upstream provider. After the switch, the local record is updated to reflect the new protocol, port, and credentials returned by the provider.

## Path parameters

<ParamField path="order_id" type="string" required>
  UUID of the order.
</ParamField>

## Body

<ParamField body="new_type" type="string" required>
  Target protocol. Must be one of `HTTP` or `SOCKS5`.
</ParamField>

## Response

Updated proxy object after the protocol change. Same shape as the `managed_proxy` object in [Get order](/api/orders/get-order).

<Note>
  This endpoint makes a live call to the upstream provider. The proxy may briefly be unavailable during the protocol switch.
</Note>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.proxyjam.com/public/v1/orders/997b4450-e7ae-4ad9-8a25-996e582049c9/protocol" \
    -H "X-API-Key: pj_AbCdEf..." \
    -H "Content-Type: application/json" \
    -d '{"new_type": "SOCKS5"}'
  ```

  ```python Python theme={null}
  from proxyjam import ProxyJamClient

  with ProxyJamClient(api_key="pj_live_...") as proxyjam:
      proxy = proxyjam.proxies.change_protocol(
          "997b4450-e7ae-4ad9-8a25-996e582049c9",
          "SOCKS5",
      )
      print(proxy.protocol, proxy.port)
  ```

  ```json Response theme={null}
  {
    "order_id": "997b4450-e7ae-4ad9-8a25-996e582049c9",
    "provider_proxy_id": "1836367",
    "provider_order_id": "019c8094-c196-7b71-852f-4e5e2e2fceff",
    "host": "92.113.88.106",
    "port": 42416,
    "username": "<proxy-username>",
    "password": "<proxy-password>",
    "protocol": "SOCKS5",
    "status": "active",
    "expires_at": "2026-03-21T14:22:39Z",
    "auto_renew": true,
    "whitelisted_ips": [],
    "bandwidth_total_gb": 1.0,
    "bandwidth_used_gb": 0.1
  }
  ```
</CodeGroup>
