VDS Host
Reseller VPS Servers VPS Builder Dedicated API About Blog Contact Sign in
codeReseller API v1

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.

# Taban yol
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.

# İmza şeması (istemci tarafı)
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"}'
info IP Whitelist: Your API key only accepts calls from the IP addresses you define in the panel. Keys are managed in the reseller_api_keys table and all calls are logged in reseller_api_logs.

Error Codes

CodeMeaning
200 / 201 / 202Success / created / queued
400Invalid request body
401Signature invalid or missing
403IP not whitelisted / not authorized
409Replay detected (timestamp reuse)
429Rate limit exceeded

Account & Products

GET/api/reseller/v1/account

Returns active balance, current discount tier (TIER) and account status.

# Yanıt
{
  "balance": 3250.00,
  "tier": "Gold",
  "discount": 28,
  "currency": "USD"
}
GET/api/reseller/v1/products

Lists ready VDS products available for sale and the unit prices for custom configurations.

# Yanıt
[
  { "id": 42, "name": "VDS M", "cpu": 4, "ram": 8, "disk": 100, "price": 14.00 }
]

Server Lifecycle

GET/api/reseller/v1/vm

Lists all VDS instances on the account with their status.

[
  { "id": "vm_8f3a21", "status": "running", "ip": "185.x.x.x" }
]
GET/api/reseller/v1/vm/{id}

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 }
}
POST/api/reseller/v1/vm

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.

# İstek
{
  "cpu": 4, "ram": 8, "disk": 160,
  "os": "ubuntu-22.04", "hostname": "web-01"
}

# Yanıt 201
{ "id": "vm_8f3a21", "status": "provisioning" }
POST/api/reseller/v1/vm/{id}/resize

Updates the CPU, RAM or disk resources of an existing server.

# İstek
{ "cpu": 8, "ram": 16 }
# → 202 Accepted
POST/api/reseller/v1/vm/{id}/reinstall

Formats and reinstalls the server with the selected operating system.

# İstek
{ "os": "debian-12" }
# → 202 Accepted
POST/api/reseller/v1/vm/{id}/terminate

Permanently terminates the server and releases its resources.

# → 200 OK
{ "id": "vm_8f3a21", "status": "terminated" }

Power & Access

POST/api/reseller/v1/vm/{id}/power

Start, stop, reboot or force-stop. action: start · stop · reboot · force_stop.

# İstek
{ "action": "reboot" }
# → 200 OK
GET/api/reseller/v1/vm/{id}/credentials

Securely returns the server's username and initial password.

{ "username": "root", "password": "••••••••" }
POST/api/reseller/v1/vm/{id}/password

Resets the server's root/admin password.

# → 200 OK
{ "password": "yeni-parola" }
POST/api/reseller/v1/vm/{id}/console

Generates a single-use NoVNC/KVM console link accessible from the browser.

# → 200 OK
{ "console_url": "https://console.vdshost.com/...", "expires_in": 120 }

Backup & Security

Backups

GET/api/reseller/v1/vm/{id}/backups

Lists the server's existing backups.

[ { "backup_id": "bk_19c", "created_at": "2026-06-24T10:00:00Z" } ]
POST/api/reseller/v1/vm/{id}/backups

Takes an instant backup.

# → 201 Created
{ "backup_id": "bk_19c" }
POST/api/reseller/v1/vm/{id}/backups/restore

Restores the specified backup.

# İstek
{ "backup_id": "bk_19c" }
# → 202 Accepted
DELETE/api/reseller/v1/vm/{id}/backups

Deletes the specified backup.

# İstek
{ "backup_id": "bk_19c" }
# → 200 OK

Firewall

GET/api/reseller/v1/vm/{id}/firewall

Returns the firewall rules defined on the server.

[ { "id": 1, "port": 22, "proto": "tcp", "action": "allow" } ]
POST/api/reseller/v1/vm/{id}/firewall

Adds a new firewall rule.

# İstek
{ "port": 443, "proto": "tcp", "action": "allow" }
DELETE/api/reseller/v1/vm/{id}/firewall/{rule}

Removes the specified firewall rule.

# → 200 OK

Integrations

extensionWHMCS ModülüFree

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.

# ServerConnection eşlemesi
hostname = api.vdshost.com
username = {api_key}  # maskeli
password = {api_secret} # maskeli
module_config = { "upstream_product_id": 42, "os_map": {...} }
extensionWiseCP ModülüÜcretsiz

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.

# UpstreamApiClient çağrıları
client.post('vm', body)     # oluştur
client.post('vm/{id}/power'# güç
client.post('vm/{id}/reinstall')
client.get('vm/{id}/backups')