API

通过 API 管理代理

通过 API 修改代理密码、IP 白名单、系统指纹,生成住宅代理,管理移动设备,以及每项操作所需的权限。

更新于 2026年11月22日

更换代理密码#

POST /orders/{id}/change-password 为订单内所有代理生成新密码,旧密码立即失效。需要 manage 权限。响应返回订单:新密码仅对同时拥有 credentials 权限的密钥可见。

Shell
curl -X POST https://proxya.co/api/v1/orders/$ORDER_ID/change-password \
  -H "Authorization: Bearer $PROXYA_API_KEY"

IP 白名单#

白名单中的地址无需密码即可连接 ISP 和数据中心代理。添加地址需要 credentials 权限,移除地址需要 manage 或 credentials 权限。白名单的工作方式见 IP 白名单。

Shell
# Add an address (credentials permission)
curl -X POST https://proxya.co/api/v1/orders/$ORDER_ID/whitelist \
  -H "Authorization: Bearer $PROXYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ip": "203.0.113.10"}'

# Remove one address. Without ?ip= every address is removed.
curl -X DELETE "https://proxya.co/api/v1/orders/$ORDER_ID/whitelist?ip=203.0.113.10" \
  -H "Authorization: Bearer $PROXYA_API_KEY"

系统指纹#

GET、POST 和 DELETE /orders/{id}/fingerprint 用于查看、开启和关闭 ISP 与数据中心订单的系统指纹伪装。开启需要 manage 权限。白名单中有地址时伪装不生效,详见 系统指纹。

Shell
# Profiles that can be set
curl https://proxya.co/api/v1/catalog/spoofing-profiles -H "Authorization: Bearer $PROXYA_API_KEY"

# Turn spoofing on with one of them
curl -X POST https://proxya.co/api/v1/orders/$ORDER_ID/fingerprint \
  -H "Authorization: Bearer $PROXYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profile": "windows"}'

# Turn it off
curl -X DELETE https://proxya.co/api/v1/orders/$ORDER_ID/fingerprint -H "Authorization: Bearer $PROXYA_API_KEY"

住宅代理#

请求权限返回内容
GET /residential/statusread剩余和已用流量(GB)。Residential Pro 使用 ?tier=pro。
POST /residential/generatecredentials从流量余额生成代理连接串。生成不扣款,使用代理时计算流量。
GET /residential/portsread该套餐的 HTTP、SOCKS5 和通用端口。
GET /residential/entry-hostsread该套餐的入口。
GET /residential/usageread按天和网站统计的流量。days 为 1 至 90。
Shell
curl -X POST https://proxya.co/api/v1/residential/generate \
  -H "Authorization: Bearer $PROXYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"count": 10, "country": "us", "session": "sticky", "ttl": 30, "protocol": "http"}'
generate 字段取值
count1 至 500 条
countryany 或国家代码,如 us
city可选,城市
sessionrotating 或 sticky
ttl固定会话时长,1 至 10080 分钟
protocolhttp 或 socks5
tierResidential Pro 填 pro,标准套餐不填

连接串格式与控制台生成器相同,详见 生成器。

移动设备#

Shell
# New IP now
curl -X POST https://proxya.co/api/v1/mobile/orders/$ORDER_ID/rotate-ip \
  -H "Authorization: Bearer $PROXYA_API_KEY"

# New IP every 10 minutes (0 turns the timer off)
curl -X POST https://proxya.co/api/v1/mobile/orders/$ORDER_ID/rotation \
  -H "Authorization: Bearer $PROXYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"minutes": 10}'
请求权限请求体
GET /mobile/orders/{id}read设备状态:IP、端口、流量、设置
GET /mobile/orders/{id}/ip-historyreadoffset,count 最大 100
POST /mobile/orders/{id}/rotate-ipmanage无请求体。受设备最短间隔限制
POST /mobile/orders/{id}/rotationmanageminutes 0 至 1440。0 表示仅按请求换 IP
POST /mobile/orders/{id}/osmanagefamily:windows、android、ios、macos,空字符串为关闭
POST /mobile/orders/{id}/ip-modemanagemode:v4 或 v6
POST /mobile/orders/{id}/authcredentialsmode:credentials 或 ip,以及最多 10 个地址的 ips
GET /mobile/orders/{id}/openvpncredentialsOpenVPN 配置文件
GET /mobile/orders/{id}/wireguardcredentialsWireGuard 配置文件

没有 credentials 权限时,设备状态不包含用户名和 VLESS 链接。

没有找到答案?

网站在线客服 24 小时回复。通过 Telegram 联系通常最快,提交工单会通过邮件回复。