# Set cloud phone proxy

Set proxy settings for one or more cloud phones. Supports binding proxyId directly, or adding/modifying detailed proxy parameters. The request payload format is identical to browser proxy configuration, and settings are synchronized to channel providers in real-time.

Endpoint: POST /api/cloudphone/setProxy
Version: 1.0.0

## Request fields (application/json):

  - `ids` (array)
    List of cloud phone environment IDs
    Example: [1558968155668507]

  - `uniqueIds` (array)
    List of display sequence IDs of cloud phone environments (used as reference mapping if envIds are not provided)
    Example: [1001]

  - `proxy` (object)

  - `proxy.proxyId` (integer)
    Proxy Configuration ID (If this value is greater than 0, it means reusing an existing proxy configuration; if empty or <=0, it represents using the subsequent detailed parameters to create/update proxy details)
    Example: 10002

  - `proxy.proxyIp` (string, required)
    Proxy server IP address
    Example: 192.168.1.100

  - `proxy.proxyPort` (integer, required)
    Proxy server port
    Example: 8080

  - `proxy.proxyName` (string)
    Proxy configuration name/description
    Example: test_proxy_01

  - `proxy.proxyProvider` (integer, required)
    Proxy provider 0:http, 1:https, 2:socks5
    Example: 2

  - `proxy.username` (string)
    Proxy authentication username
    Example: admin

  - `proxy.password` (string)
    Proxy authentication password
    Example: pwd123

  - `proxy.refreshUrl` (string)
    API URL to refresh dynamic proxy IP
    Example: http://api.proxy.com/refresh

  - `proxy.country` (string)
    Country code of the proxy location (e.g. CN, US)
    Example: US

  - `proxy.state` (string)
    State/Province of the proxy location
    Example: California

  - `proxy.city` (string)
    City of the proxy location
    Example: Los Angeles

## Response 200 fields (application/json):

  - `code` (integer)
    Response code: 0 = success, >0 = error

  - `data` (object)
    Empty response data
    Example: {}

  - `msg` (string)
    Message; populated if code > 0

