Home / API Docs

Automate
everything.

Resell our infrastructure under your brand. Plug-and-play billing platform integrations, plus complete REST API references for VPS and proxy provisioning.

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"}

Parameters may be sent as a JSON body, as form fields, or in the query string. If the same parameter appears in more than one place, the JSON body wins, then the form field, then the query string.

GET

?action=plans

List available VPS plans with your reseller pricing.

Each plan includes a product_line field (VPS, VDS or VDSPRO). Upgrades are only allowed to a higher-priced plan in the same product line and the same location; use this field to build valid upgrade paths programmatically.

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
GET

?action=graphs&id={server_id}

Get resource usage time series for an active server. Ideal for rendering CPU / RAM / network graphs in your own customer panel.

ParameterTypeDescription
id *string8-character server ID
timeframestring1hr (default) or 24hr

Returns three arrays of data points. cpu points carry cpu as percent (0-100). ram points carry ram as percent of the plan's total RAM (0-100). network points carry in and out in KB/s. Each point includes a date unix timestamp.

{
  "success": true,
  "data": {
    "timeframe": "1hr",
    "cpu":     [{ "date": 1789000000, "cpu": 12.4 }, ...],
    "ram":     [{ "date": 1789000000, "ram": 38.75 }, ...],
    "network": [{ "date": 1789000000, "in": 220.1, "out": 84.6 }, ...]
  }
}
GET

?action=status

Node status, scheduled maintenance windows and open incidents, so you can show platform health directly in your own customer dashboard. Takes no parameters and is not tied to a specific server.

This is the same data that drives our public status page, derived the same way, so your panel and ours can never disagree.

FieldTypeDescription
overallstringoperational, maintenance, degraded, partial_outage or major_outage
nodes[].statusstringup, degraded or down
nodes[].uptime_90dfloatPercent uptime over 90 days, or null
maintenance[].statestringscheduled or in_progress
incidents[].impactstringNONE, MINOR, MAJOR or CRITICAL

All timestamps are Unix seconds (UTC). Completed maintenance and incidents resolved more than 7 days ago are omitted. Please poll no more than once a minute; the underlying data refreshes on a schedule and more frequent calls will not return anything newer.

{
  "success": true,
  "data": {
    "overall": "maintenance",
    "generated_at": 1787347200,
    "summary": {
      "nodes_total": 204,
      "nodes_down": 0,
      "nodes_degraded": 0,
      "open_incidents": 0,
      "maintenance_scheduled": 1
    },
    "nodes": [
      {
        "id": "cmqa2j2360007oe0u6jlbxcvq",
        "name": "LA1",
        "category": "VDS",
        "status": "up",
        "uptime_90d": 99.955,
        "last_cause": null,
        "changed_at": 1786435261
      }
    ],
    "maintenance": [
      {
        "id": "cmsq4u8w40007pc01vm43p535",
        "title": "Kernel Security Update - Node Reboots Required",
        "description": "Each node will be rebooted to load the updated kernel...",
        "affected_monitors": [],
        "starts_at": 1787335200,
        "ends_at": 1787349600,
        "state": "scheduled"
      }
    ],
    "incidents": []
  }
}
POST

?action=create

Provision a new server. The root password is generated automatically and returned in the response.

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 *stringup to 16 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 (up to 16 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-16 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'
]);