Home / API Docs

API Documentation

Complete REST API reference for managing VPS servers and proxies programmatically. We offer separate APIs for each product type.

Three APIs, Three Products

Leased Hardware API

Servers on leased third-party hardware. We do not own these machines. Limited OS selection, no FDE, no SSH key support, password auth only.

https://servury.com/api/legacy.php

Proxy API

Datacenter, residential, and rotating proxies. Order proxies, manage credentials, whitelist IPs, renew/top-up, and terminate via API.

https://servury.com/api/proxy.php

Owned Hardware API Coming Soon

Servers running on hardware we own and operate in our own colocation facility. Full control, more OS options, FDE support, SSH key auth, IPv4/IPv6 dual-stack. API access not yet available.

Leased Hardware API Proxy API Owned Hardware API Coming Soon

Authentication

All API requests require authentication via the X-Reseller-Key header.

X-Reseller-Key: your_api_key_here

Keep your API key secret. Never expose it in client-side code.

Base URL

https://servury.com/api/legacy.php

Response Format

All endpoints return JSON. Successful responses:

{"success": true, "data": {...}}

Error responses:

{"success": false, "error": "message"}
GET

?action=plans

List available VPS plans with your reseller pricing.

GET

?action=account

Get reseller account information including balance, discount, and payment method.

Example Response

{ "success": true, "data": { "balance": 42.50, "discount_percent": 33.3, "payment_method": "account_balance", "has_saved_card": false } }
GET

?action=servers

List all servers belonging to the reseller.

GET

?action=server&id={server_id}

Get detailed information for a specific server including password.

ParameterTypeDescription
id *string8-character server ID

Example Response

{ "success": true, "data": { "server": { "id": "abc12345", "hostname": "myserver", "ip_address": "31.57.201.10", "os": "debian12", "plan": "S-100", "location": "Netherlands", "status": "active", "username": "root", "password": "generated_password", "expiration_date": 1712592000 } } }
GET

?action=console&id={server_id}

Get noVNC console URL for a server.

ParameterTypeDescription
id *string8-character server ID
POST

?action=create

Provision a new server on leased infrastructure. Password is auto-generated by the provider.

Price is prorated by days. Orders shorter than 31 days carry a 10% short-term fee, which is already included in the returned amount_charged.

ParameterTypeDescription
plan_id *integerPlan ID from GET ?action=plans
hostname *string3-63 alphanumeric characters
os *stringdebian12, ubuntu24, centos10, winserv25, winserv22
daysinteger1-365 (default: 31). Under 31 days adds a 10% short-term fee.
POST

?action=renew&id={server_id}

Renew/extend a server subscription.

Price is prorated by days. Renewals shorter than 31 days carry a 10% short-term fee, which is already included in the returned amount_charged.

ParameterTypeDescription
id *string8-character server ID
days *integer1-365. Under 31 days adds a 10% short-term fee.
POST

?action=upgrade&id={server_id}

Upgrade a server to a higher plan. Prorated charge for the remaining days. This is an in-place resize: data, IP and OS are preserved.

The target plan must be in the same location and the same product line as the current server, and a higher tier. You cannot change location or switch lines (e.g. VPS to VDS) via an upgrade. You can only move up within your current line:

Product lineUpgrade path (by plan tier)
VPSVPS-100 → VPS-150 → VPS-200 → VPS-250
VDSVDS-150 → VDS-300 → VDS-450
VDS-ProVDS-100 → VDS-200 → VDS-250 → VDS-350 → VDS-400

For example: a VPS-100 in France can upgrade to VPS-150/200/250 in France, but not to any VDS plan and not to a plan in another location. Use ?action=plans to find the matching plan's id in the same location.

ParameterTypeDescription
id *string8-character server ID
plan_id *integerTarget plan ID (from ?action=plans). Must be same location, same line, higher tier.
POST

?action=terminate&id={server_id}

Permanently delete a server (no refund).

ParameterTypeDescription
id *string8-character server ID
POST

?action=power&id={server_id}

Execute power actions on a server.

ParameterTypeDescription
id *string8-character server ID
action *stringstart, stop, or restart
POST

?action=reinstall&id={server_id}

Reinstall the operating system (wipes all data).

ParameterTypeDescription
id *string8-character server ID
os *stringdebian12, ubuntu24, centos10, winserv25, winserv22
POST

?action=changepass&id={server_id}

Reset the server's root (or Administrator on Windows) password. A new password is generated automatically; retrieve it via ?action=server once the task completes.

ParameterTypeDescription
id *string8-character server ID
POST

?action=fixnetwork&id={server_id}

Reset the server's networking configuration. Useful when a server loses connectivity after a misconfiguration.

ParameterTypeDescription
id *string8-character server ID
POST

?action=hostname&id={server_id}

Update server hostname.

ParameterTypeDescription
id *string8-character server ID
hostname *stringNew hostname (3-63 alphanumeric characters)
POST

?action=ip&id={server_id}

Change the server's IP address. This is a paid operation, charged at the flat IP-change price (your reseller discount does not apply to IP changes).

ParameterTypeDescription
id *string8-character server ID

Error Responses

All errors return JSON with success: false and an error message.

401 Unauthorized

{"success": false, "error": "Invalid or inactive API key."}

404 Not Found

{"success": false, "error": "Server not found."}

400 Bad Request

{"success": false, "error": "Invalid hostname. Use 3-63 alphanumeric characters."}

PHP Example

<?php
$apiKey = "your_api_key_here";
$baseUrl = "https://servury.com/api/legacy.php";

function apiRequest($endpoint, $apiKey, $method = 'GET', $data = null) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $endpoint);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        "X-Reseller-Key: $apiKey",
        "Content-Type: application/json"
    ]);

    if ($method === 'POST') {
        curl_setopt($ch, CURLOPT_POST, true);
        if ($data) {
            curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
        }
    }

    $response = curl_exec($ch);
    curl_close($ch);

    return json_decode($response, true);
}

// Check balance
$account = apiRequest("$baseUrl?action=account", $apiKey);
echo "Balance: $" . $account['data']['balance'];

// Create a server
$newServer = apiRequest("$baseUrl?action=create", $apiKey, 'POST', [
    'plan_id' => 5,
    'hostname' => 'myserver',
    'os' => 'debian12',
    'days' => 31
]);

// Power cycle a server
$result = apiRequest("$baseUrl?action=power&id=abc12345", $apiKey, 'POST', [
    'action' => 'restart'
]);