Skip to content
Local APIProxies

Update a proxy ​

Version overview
PUT
/api/v1/proxies/{proxy_id}

Fully replace the name, notes, and connection settings of a custom or api proxy, then return its updated full details. mode must match the existing proxy. For API proxies, auth_type defaults to whitelist. Both username and password are required when credential is selected; whitelist ignores and clears credentials. Omitting remark, username, or password clears that field. integ and syt proxies are managed by the platform and cannot be updated through this endpoint. The update does not change the most recent check status, check time, or profile bindings.

Request parameters

Authorization Bearer Token

Include your API Key as a Bearer token in the Authorization request header.

Authorization: Bearer <api-key>

Path parameters

1
Fields
stringrequired
Unique proxy ID
Example"proxy_01JABCDEF1234567890"
minLength: 1

Body parameters

requiredapplication/jsonProxyUpdateRequest
Fields
object
Example

Generated from the schema; not a live response.

{
  "name": "string",
  "mode": "custom",
  "config": {
    "protocol": "http",
    "ip_protocol": "ipv4",
    "host": "string",
    "port": 0
  }
}

Request code examples

JavaScript / TypeScript: Node.js 18+ with fetch; PHP: cURL extension; Go: 1.16+; Java: JDK 11+. Replace the token and example parameter values before running.

curl -X PUT -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' -d '{
  "name": "string",
  "mode": "custom",
  "config": {
    "protocol": "http",
    "ip_protocol": "ipv4",
    "host": "string",
    "port": 0
  }
}' 'http://local.zhongyibrowser.com:39025/api/v1/proxies/proxy_01JABCDEF1234567890'

Responses

Success: code = 0. Failure: code > 0. Select a status to view its fields and example. Expand objects to inspect nested fields. Optional fields may be omitted.

Updated proxy details

Body

application/jsonProxyDetailSuccessResponse
Fields
numberrequired
Business status code; always 0 on success
Enum
stringrequired
Business status message; always success on success
Enum
objectrequired
Endpoint business data
Example

Generated from the schema; not a live response.

{
  "code": 0,
  "message": "success",
  "data": {
    "id": "string",
    "name": "string",
    "remark": "string",
    "status": "unchecked",
    "checked_at": "2024-01-15T09:30:00Z",
    "browser_count": 0,
    "is_expired": true,
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z",
    "mode": "custom",
    "config": {
      "protocol": "http",
      "ip_protocol": "ipv4",
      "host": "string",
      "port": 0,
      "username": "string",
      "password": "string"
    },
    "browser_ids": [
      "env_01JABCDEF1234567890"
    ]
  }
}

View all business error codes and HTTP statuses

ZYBrowser Local API documentation