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

Owned API

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.

https://servury.com/api/reseller.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

Legacy 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
Owned API Proxy API Legacy API

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/reseller.php

Response Format

All endpoints return JSON. Successful responses:

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

Error responses:

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

?action=plans

List available owned infrastructure plans with your reseller pricing.

GET

?action=locations

List available server locations for owned infrastructure.

GET

?action=os

List available operating systems.

Owned infrastructure supports more OS options than Legacy, including FreeBSD, OpenBSD, and Debian 12 with full disk encryption.

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 owned servers belonging to the reseller.

GET

?action=server&id={server_id}

Get detailed information for a specific server.

ParameterTypeDescription
id *string8-character server ID

Example Response

{ "success": true, "data": { "server": { "id": "abc12345", "hostname": "myserver", "ipv4_address": "38.69.13.10", "ipv6_address": "2001:550:601:5::abc", "os": "debian12", "plan": "O-100", "location": "Montreal, Canada", "status": "active", "username": "root", "fde_enabled": false, "expiration_date": 1712592000 } } }
GET

?action=console&id={server_id}

Get console access URL and ticket for a server.

ParameterTypeDescription
id *string8-character server ID
POST

?action=create

Provision a new server on owned infrastructure. Either password or ssh_key is required.

ParameterTypeDescription
plan_id *integerPlan ID from /plans endpoint
hostname *string3-63 alphanumeric characters
os *stringdebian12, debian13, ubuntu24, rocky9, freebsd14, openbsd78, winserv25
daysinteger1-365 (default: 31)
passwordstringRoot password, min 8 characters. Required if no ssh_key.
ssh_keystringSSH public key for root login. Required if no password.
ipv4booleanAllocate an IPv4 address (default: false). Adds $2.99/mo surcharge.
fdebooleanEnable full disk encryption (default: false). Requires ssh_key. Debian 12 only.
POST

?action=renew&id={server_id}

Renew/extend a server subscription.

ParameterTypeDescription
id *string8-character server ID
days *integer1-365
POST

?action=upgrade&id={server_id}

Upgrade server to a higher plan. You are charged the prorated price difference for remaining days. The server will be restarted with the new specs and disk expanded.

ParameterTypeDescription
id *string8-character server ID
plan_id *integerTarget plan ID (must be higher price than current)
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, debian13, ubuntu24, rocky9, freebsd14, openbsd78, winserv25
passwordstringNew root password (min 8 characters)
ssh_keystringSSH public key for root login
POST

?action=hostname&id={server_id}

Update server hostname.

ParameterTypeDescription
id *string8-character server ID
hostname *stringNew hostname (alphanumeric and hyphens, max 100 chars)

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": "Either password or ssh_key is required."}

PHP Example

<?php
$apiKey = "your_api_key_here";
$baseUrl = "https://servury.com/api/reseller.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 with SSH key
$newServer = apiRequest("$baseUrl?action=create", $apiKey, 'POST', [
    'plan_id' => 101,
    'hostname' => 'myserver',
    'os' => 'debian12',
    'days' => 31,
    'ssh_key' => 'ssh-ed25519 AAAA...',
    'ipv4' => true
]);

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

Authentication

All API requests require authentication via the X-Reseller-Key header. Same key as the server APIs.

X-Reseller-Key: your_api_key_here

Base URL

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

Response Format

All endpoints return JSON. Successful responses:

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

Error responses:

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

Proxy Types

TypeDescriptionBilling
datacenterStatic IPv4/IPv6 proxies in US, CA, FR, UK, NL. HTTP + SOCKS5.Per proxy, per day (3-365 days)
residentialRotating residential IPs. Bandwidth-based, no expiration.Per GB of bandwidth
rotatingRotating IPv6 proxies in Canada. Configurable thread count.Per duration + thread count
GET

?action=account

Get reseller account info (balance, discount, payment method).

Example Response

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

?action=stock

Get datacenter proxy stock by country and IP type. Check this before ordering.

Example Response

{ "success": true, "data": { "stock": { "ipv4": {"us": 150, "ca": 80, "fr": 45, "uk": 60, "nl": 30}, "ipv6": {"us": 500, "ca": 200} } } }
GET

?action=price

Calculate price for any proxy type before ordering. Returns your reseller price.

ParameterTypeDescription
type *stringdatacenter, residential, or rotating
daysintegerDuration (datacenter: 3-365, rotating: 7/14/30/60/90)
quantityintegerNumber of proxies (datacenter only, 1-100)
bandwidthintegerGB of bandwidth (residential only, 1-1000)
threadsintegerThread count (rotating only, 100-5000)
GET

?action=proxies

List all proxies (datacenter, residential, and rotating) with credentials.

GET

?action=proxy&id={proxy_id}

Get detailed info for a single proxy including credentials and whitelisted IPs.

ParameterTypeDescription
id *string8-character proxy ID
POST

?action=create_datacenter

Order datacenter proxies. Returns proxy credentials immediately.

ParameterTypeDescription
country *stringUS, CA, FR, UK, or NL
daysinteger3-365 (default: 30)
quantityinteger1-100 (default: 1)
ip_typestringipv4 or ipv6 (default: ipv4)

Example Response

{ "success": true, "data": { "message": "1 datacenter proxy created.", "proxies": [{ "id": "abc12345", "ip": "185.123.45.67", "port_http": 8080, "port_socks5": 1080, "username": "user123", "password": "pass456", "expiration_date": 1714000000 }], "amount_charged": 2.50 } }
POST

?action=create_residential

Order a residential proxy subscription with bandwidth.

ParameterTypeDescription
bandwidth *integerBandwidth in GB (1-1000)
POST

?action=create_rotating

Order a rotating IPv6 proxy.

ParameterTypeDescription
countrystringCurrently only CA (default)
daysinteger7, 14, 30, 60, or 90 (default: 30)
threadsinteger100-5000 (default: 100)
protocolstringCurrently only ipv6 (default)
POST

?action=renew&id={proxy_id}

Renew a datacenter or rotating proxy. Not applicable to residential (use topup instead).

ParameterTypeDescription
id *string8-character proxy ID
days *integerDatacenter: 3-365. Rotating: 7/14/30/60/90.
POST

?action=topup&id={proxy_id}

Add bandwidth to a residential proxy.

ParameterTypeDescription
id *string8-character proxy ID
bandwidth *integerGB to add (1-1000)
POST

?action=reset_credentials&id={proxy_id}

Reset proxy username/password. Works for all proxy types. Returns new credentials.

ParameterTypeDescription
id *string8-character proxy ID
POST

?action=add_ip&id={proxy_id}

Add an IP to the proxy whitelist (datacenter and rotating only).

ParameterTypeDescription
id *string8-character proxy ID
ip *stringIP address to whitelist
POST

?action=remove_ip&id={proxy_id}

Remove an IP from the proxy whitelist.

ParameterTypeDescription
id *string8-character proxy ID
ip *stringIP address to remove
POST

?action=terminate&id={proxy_id}

Permanently delete a proxy (no refund).

ParameterTypeDescription
id *string8-character proxy 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": "Proxy not found."}

400 Bad Request

{"success": false, "error": "Out of stock for US (IPv4)"}

PHP Example

<?php
$apiKey = "your_api_key_here";
$baseUrl = "https://servury.com/api/proxy.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 stock before ordering
$stock = apiRequest("$baseUrl?action=stock", $apiKey);

// Get price quote
$price = apiRequest("$baseUrl?action=price&type=datacenter&days=30&quantity=5", $apiKey);
echo "5 proxies for 30 days: $" . $price['data']['total'];

// Order 5 datacenter proxies
$order = apiRequest("$baseUrl?action=create_datacenter", $apiKey, 'POST', [
    'country' => 'US',
    'days' => 30,
    'quantity' => 5,
    'ip_type' => 'ipv4'
]);

// List all proxies with credentials
$proxies = apiRequest("$baseUrl?action=proxies", $apiKey);
foreach ($proxies['data']['proxies'] as $p) {
    echo "{$p['ip']}:{$p['port_http']} ({$p['type']})\n";
}

// Renew a datacenter proxy
$result = apiRequest("$baseUrl?action=renew&id=abc12345", $apiKey, 'POST', [
    'days' => 30
]);

// Top up residential bandwidth
$result = apiRequest("$baseUrl?action=topup&id=xyz98765", $apiKey, 'POST', [
    'bandwidth' => 10
]);

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=locations

List available server locations.

GET

?action=os

List available operating systems. Legacy infrastructure supports: Debian 12, Debian 13, Ubuntu 24, Rocky Linux 9, CentOS 10, and Windows Server 2025.

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.

ParameterTypeDescription
plan_id *integerPlan ID from /plans endpoint
hostname *string3-63 alphanumeric characters
os *stringdebian12, debian13, ubuntu24, rocky9, centos10, winserv25
daysinteger1-365 (default: 31)
POST

?action=renew&id={server_id}

Renew/extend a server subscription.

ParameterTypeDescription
id *string8-character server ID
days *integer1-365
POST

?action=upgrade&id={server_id}

Upgrade server to a higher plan. Prorated charge for remaining days.

ParameterTypeDescription
id *string8-character server ID
plan_id *integerTarget plan ID (must be higher price than current)
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, debian13, ubuntu24, rocky9, centos10, winserv25
POST

?action=hostname&id={server_id}

Update server hostname.

ParameterTypeDescription
id *string8-character server ID
hostname *stringNew hostname (alphanumeric and hyphens)
POST

?action=ip&id={server_id}

Change the server's IP address. This is a paid operation.

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'
]);