ProxyWing
浏览端点

ProxyWing 开发者 API

账户

资料、钱包余额、账单、服务、自动续费和 API 密钥管理。

GET /account/me

获取账户资料

返回对本次请求进行身份验证所用的 API 密钥所属账户的资料。

验证 · Bearer
请求 GET /account/me
curl -X GET "https://api.proxywing.com/v1/account/me" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "email": "customer@example.com",
  "name": "Jane Doe",
  "country": "US",
  "currency": "USD",
  "status": "active"
}
GET /account/balance

获取账户余额

返回该账户当前的钱包余额。

验证 · Bearer
请求 GET /account/balance
curl -X GET "https://api.proxywing.com/v1/account/balance" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "balance": 42.5,
  "currency": "USD"
}
GET /account/invoices

列出账单

返回账户中的账单,最新的排在最前。每次调用最多返回 limit 张账单(默认 1000);total 为账单总数,因此如果账户中的账单更多,请使用 offset 分页。

验证 · Bearer

查询参数

  • limit integer 可选

    要返回的最大账单数,1–1000。默认 1000。

  • offset integer 可选

    要跳过的账单数,用于分页。默认 0。

  • status string 可选

    仅返回此状态的账单:"paid"、"unpaid"、"overdue"、"cancelled"、"refunded"、"collections" 或 "payment_pending"。设置后,`total` 为匹配账单的数量。

请求 GET /account/invoices
curl -X GET "https://api.proxywing.com/v1/account/invoices" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "invoices": [
    {
      "id": "inv_200001",
      "status": "paid",
      "date": "2026-06-02",
      "due_date": "2026-06-02",
      "total": 1.8,
      "currency": "USD"
    }
  ],
  "total": 1
}
GET /account/services

列出服务

返回账户中的所有服务(代理订单、VPN 套餐等)。family 为其所属的产品组名称。

验证 · Bearer

查询参数

  • status string 可选

    仅返回此状态的服务,例如 "active"、"suspended"、"terminated" 或 "cancelled"。省略则列出全部。

请求 GET /account/services
curl -X GET "https://api.proxywing.com/v1/account/services" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "services": [
    {
      "id": "svc_100001",
      "product": "1 Proxy DC UK",
      "family": "Proxy UK",
      "status": "active",
      "next_due_date": "2026-08-02",
      "billing_cycle": "monthly"
    }
  ]
}
GET /account/services/{svc_id}/auto-renew

获取自动续费状态

返回某项服务是否已开启自动续费。启用后,续费账单到期时将自动从账户余额中支付。

验证 · Bearer

路径参数

  • svc_id string 必填

    服务 ID,例如 svc_100001,可从 GET /account/services 获取。

请求 GET /account/services/{svc_id}/auto-renew
curl -X GET "https://api.proxywing.com/v1/account/services/{svc_id}/auto-renew" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "service_id": "svc_100001",
  "enabled": false
}
PUT /account/services/{svc_id}/auto-renew

设置自动续费

为服务开启或关闭自动续费。此操作仅切换该设置,不会创建或支付任何账单。

验证 · Bearer

路径参数

  • svc_id string 必填

    服务 ID,例如 svc_100001。

请求体参数

  • enabled boolean 必填

    true 表示启用自动续费,false 表示停用。

请求 PUT /account/services/{svc_id}/auto-renew
curl -X PUT "https://api.proxywing.com/v1/account/services/{svc_id}/auto-renew" \
  -H "Authorization: Bearer pk_live_XXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true}'
响应 200 · application/json
{
  "service_id": "svc_100001",
  "enabled": true
}
GET /account/api-keys

列出 API 密钥

返回账户中的所有 API 密钥。密钥的机密内容永远不会返回——仅返回用于识别该密钥的前缀。

验证 · Bearer
请求 GET /account/api-keys
curl -X GET "https://api.proxywing.com/v1/account/api-keys" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "api_keys": [
    {
      "public_id": "key_3Nb8Qv1Xk2Rf9Ta6Ue0p",
      "key_prefix": "pk_live_3Nb8",
      "label": "Production server",
      "scopes": "write",
      "status": "active"
    }
  ]
}
DELETE /account/api-keys/{key_pub_id}

撤销 API 密钥

立即撤销 API 密钥。已在使用该密钥的所有请求将立即开始以 401 失败。此操作无法撤消。

验证 · Bearer

路径参数

  • key_pub_id string 必填

    要撤销的密钥的公开 ID,例如 key_3Nb8Qv1Xk2Rf9Ta6Ue0p。

请求 DELETE /account/api-keys/{key_pub_id}
curl -X DELETE "https://api.proxywing.com/v1/account/api-keys/{key_pub_id}" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "revoked": "key_3Nb8Qv1Xk2Rf9Ta6Ue0p"
}