API
通过 API 管理代理
通过 API 修改代理密码、IP 白名单、系统指纹,生成住宅代理,管理移动设备,以及每项操作所需的权限。
更新于 2026年11月22日
更换代理密码#
POST /orders/{id}/change-password 为订单内所有代理生成新密码,旧密码立即失效。需要 manage 权限。响应返回订单:新密码仅对同时拥有 credentials 权限的密钥可见。
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 白名单。
# 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 权限。白名单中有地址时伪装不生效,详见 系统指纹。
# 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/status | read | 剩余和已用流量(GB)。Residential Pro 使用 ?tier=pro。 |
| POST /residential/generate | credentials | 从流量余额生成代理连接串。生成不扣款,使用代理时计算流量。 |
| GET /residential/ports | read | 该套餐的 HTTP、SOCKS5 和通用端口。 |
| GET /residential/entry-hosts | read | 该套餐的入口。 |
| GET /residential/usage | read | 按天和网站统计的流量。days 为 1 至 90。 |
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 字段 | 取值 |
|---|---|
| count | 1 至 500 条 |
| country | any 或国家代码,如 us |
| city | 可选,城市 |
| session | rotating 或 sticky |
| ttl | 固定会话时长,1 至 10080 分钟 |
| protocol | http 或 socks5 |
| tier | Residential Pro 填 pro,标准套餐不填 |
连接串格式与控制台生成器相同,详见 生成器。
移动设备#
# 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-history | read | offset,count 最大 100 |
| POST /mobile/orders/{id}/rotate-ip | manage | 无请求体。受设备最短间隔限制 |
| POST /mobile/orders/{id}/rotation | manage | minutes 0 至 1440。0 表示仅按请求换 IP |
| POST /mobile/orders/{id}/os | manage | family:windows、android、ios、macos,空字符串为关闭 |
| POST /mobile/orders/{id}/ip-mode | manage | mode:v4 或 v6 |
| POST /mobile/orders/{id}/auth | credentials | mode:credentials 或 ip,以及最多 10 个地址的 ips |
| GET /mobile/orders/{id}/openvpn | credentials | OpenVPN 配置文件 |
| GET /mobile/orders/{id}/wireguard | credentials | WireGuard 配置文件 |
没有 credentials 权限时,设备状态不包含用户名和 VLESS 链接。
没有找到答案?
网站在线客服 24 小时回复。通过 Telegram 联系通常最快,提交工单会通过邮件回复。