API Docs
Manage every VDS operation from the panel programmatically. Base path /api/reseller/v1 — all requests are HMAC-signed.
Overview
The Reseller API exposes server creation, power management, console access, OS install, format, firewall, backup and extra-IP operations over REST. All responses are in JSON.
BASE https://api.vdshost.com/api/reseller/v1
# Tüm istekler şu başlıkları taşır
X-Api-Key: rk_live_xxxxxxxx
X-Timestamp: 1719230400
X-Signature: hmac_sha256(...)
Authentication (HMAC)
Each request is signed with the api_key and api_secret pair. The signature is generated client-side; the server-side reseller.api middleware verifies the HMAC signature, the IP whitelist and the rate limit. The timestamp protects against replay attacks.
payload = method + "\n" + path + "\n" + timestamp + "\n" + body
signature = hmac_sha256(api_secret, payload)
# Örnek (curl)
curl -X POST https://api.vdshost.com/api/reseller/v1/vm \
-H "X-Api-Key: KEY" \
-H "X-Timestamp: TS" \
-H "X-Signature: SIG" \
-d '{"product_id":42,"os":"ubuntu-22.04"}'
reseller_api_keys table and all calls are logged in reseller_api_logs.
Error Codes
| Code | Meaning |
|---|---|
| 200 / 201 / 202 | Success / created / queued |
| 400 | Invalid request body |
| 401 | Signature invalid or missing |
| 403 | IP not whitelisted / not authorized |
| 409 | Replay detected (timestamp reuse) |
| 429 | Rate limit exceeded |
Account & Products
Returns active balance, current discount tier (TIER) and account status.
{
"balance": 3250.00,
"tier": "Gold",
"discount": 28,
"currency": "USD"
}
Lists ready VDS products available for sale and the unit prices for custom configurations.
[
{ "id": 42, "name": "VDS M", "cpu": 4, "ram": 8, "disk": 100, "price": 14.00 }
]
Server Lifecycle
Lists all VDS instances on the account with their status.
{ "id": "vm_8f3a21", "status": "running", "ip": "185.x.x.x" }
]
Returns the resources, network, status and resource statistics of a single server.
"id": "vm_8f3a21",
"status": "running",
"cpu": 4, "ram": 8, "disk": 100,
"usage": { "cpu": 12.4, "bw": 820.5 }
}
Provisions a new VDS. Send product_id for a ready product, or cpu/ram/disk for a custom configuration. The price is calculated with the balance-based discount.
{
"cpu": 4, "ram": 8, "disk": 160,
"os": "ubuntu-22.04", "hostname": "web-01"
}
# Yanıt 201
{ "id": "vm_8f3a21", "status": "provisioning" }
Updates the CPU, RAM or disk resources of an existing server.
{ "cpu": 8, "ram": 16 }
# → 202 Accepted
Formats and reinstalls the server with the selected operating system.
{ "os": "debian-12" }
# → 202 Accepted
Permanently terminates the server and releases its resources.
{ "id": "vm_8f3a21", "status": "terminated" }
Power & Access
Start, stop, reboot or force-stop. action: start · stop · reboot · force_stop.
{ "action": "reboot" }
# → 200 OK
Securely returns the server's username and initial password.
Resets the server's root/admin password.
{ "password": "yeni-parola" }
Generates a single-use NoVNC/KVM console link accessible from the browser.
{ "console_url": "https://console.vdshost.com/...", "expires_in": 120 }
Backup & Security
Backups
Lists the server's existing backups.
Takes an instant backup.
{ "backup_id": "bk_19c" }
Restores the specified backup.
{ "backup_id": "bk_19c" }
# → 202 Accepted
Deletes the specified backup.
{ "backup_id": "bk_19c" }
# → 200 OK
Firewall
Returns the firewall rules defined on the server.
Adds a new firewall rule.
{ "port": 443, "proto": "tcp", "action": "allow" }
Removes the specified firewall rule.
Integrations
Installed as a server module. In the admin panel you add an Upstream server and define the ServerConnection mapping: hostname = VDS Host domain, username = api_key (masked), password = api_secret (masked). Your product maps via upstream_product_id and operating systems via os_map. Order, provisioning, power, format and termination flow automatically end to end.
hostname = api.vdshost.com
username = {api_key} # maskeli
password = {api_secret} # maskeli
module_config = { "upstream_product_id": 42, "os_map": {...} }
The WiseCP server module uses the same upstream logic as WHMCS. With UpstreamServerModule + UpstreamApiClient it calls the base path /api/reseller/v1. Product and OS mapping is defined in the module config; the entire VDS lifecycle is managed from the WiseCP interface.
client.post('vm', body) # oluştur
client.post('vm/{id}/power') # güç
client.post('vm/{id}/reinstall')
client.get('vm/{id}/backups')