HELPER VPS

API

基于 HTTPS 的 JSON。在 Authorization 请求头中发送您的 API 密钥。每分钟最多 300 次请求。

基础地址

https://helpervps.com/api/v1

身份验证

请求头 Authorization: Bearer YOUR_API_KEY。首次充值后在“API 密钥”页面创建密钥。

curl https://helpervps.com/api/v1/servers \
  -H "Authorization: Bearer YOUR_API_KEY"

GET /catalog

可选择的配置、位置和系统。

响应示例

{
  "plans": [ { "code": "s2", "vcpu": 1, "ram_mb": 2048, "disk_gb": 50, "monthly": "12.00" } ],
  "locations": [ "frankfurt", "singapore" ],
  "images": [ "ubuntu-24-04", "debian-12" ]
}

GET /servers

您的服务器。

响应示例

[
  { "id": 41, "label": "web-1", "state": "running", "ipv4": "192.0.2.15", "paid_until": "2026-11-14T09:00:00Z" }
]

POST /servers {"plan":"s2","location":"frankfurt","image":"ubuntu-24-04","label":"web-1"}

创建服务器,并从余额中支付第一个月。root 密码仅在响应中出现一次。

响应示例

{
  "id": 41,
  "state": "creating",
  "root_password": "..."
}

POST /servers/{id}/start (stop, reboot)

电源操作。

响应示例

{
  "id": 41,
  "state": "running"
}

POST /servers/{id}/renew

立即再支付一个月。

响应示例

{
  "id": 41,
  "paid_until": "2026-12-14T09:00:00Z"
}

DELETE /servers/{id}

删除服务器。当月剩余费用不予退款。

响应示例

{
  "id": 41,
  "state": "deleted"
}

错误

出错时返回非 2xx 状态码,以及包含错误代码的 JSON 正文。

unauthorizedAPI 密钥缺失或错误
not_allowed首次充值后才能使用 API
bad_request某个字段缺失或错误
not_enough_balance请先充值
limit账户中的服务器过多
not_created服务器创建失败;该月费用已退回余额
checking供应商未确认;我们会完成创建或退回该月费用
not_found您的账户中没有此服务器
wrong_state该操作与服务器当前状态不符
rate_limited一分钟内请求过多