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. 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"}
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.
Proxy Types
| Type | Description | Billing |
|---|---|---|
datacenter | Static IPv4/IPv6 proxies in US, CA, FR, UK, NL. HTTP + SOCKS5. | Per proxy, per day (3-365 days) |
residential | Rotating residential IPs. Bandwidth-based, no expiration. | Per GB of bandwidth |
rotating | Rotating IPv6 proxies in Canada. Configurable thread count. | Per duration + thread count |
?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
}
}
?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}
}
}
}
?action=price
Calculate price for any proxy type before ordering. Returns your reseller price.
| Parameter | Type | Description |
|---|---|---|
type * | string | datacenter, residential, or rotating |
days | integer | Duration (datacenter: 3-365, rotating: 7/14/30/60/90) |
quantity | integer | Number of proxies (datacenter only, 1-100) |
bandwidth | integer | GB of bandwidth (residential only, 1-1000) |
threads | integer | Thread count (rotating only, 100-5000) |
?action=proxies
List all proxies (datacenter, residential, and rotating) with credentials.
?action=proxy&id={proxy_id}
Get detailed info for a single proxy including credentials and whitelisted IPs.
| Parameter | Type | Description |
|---|---|---|
id * | string | 8-character proxy ID |
Residential proxies report bandwidth both in MB and in GB
(bandwidth_used_gb, bandwidth_total_gb,
bandwidth_remaining_gb). 1 GB is 1000 MB and the GB
values are rounded to two decimals, matching the panel; whole numbers
are sent without a fractional part (10, not 10.0).
The same GB fields appear on residential entries of ?action=proxies.
Example Response (residential)
{
"success": true,
"data": {
"proxy": {
"id": "abc12345",
"type": "residential",
"username": "user123",
"password": "pass456",
"bandwidth_total_mb": 10000,
"bandwidth_remaining_mb": 7350,
"bandwidth_used_gb": 2.65,
"bandwidth_total_gb": 10,
"bandwidth_remaining_gb": 7.35,
"status": "active",
"created_at": 1714000000
}
}
}
?action=usage&id={proxy_id}
Bandwidth usage time series for a residential proxy, the same data the residential panel graph is drawn from. Remaining bandwidth is snapshotted hourly; each point is the drop in remaining bandwidth since the previous snapshot, floored at zero, so a top-up never shows as negative usage. Only residential proxies have usage data; other types return a 400 error.
| Parameter | Type | Description |
|---|---|---|
id * | string | 8-character proxy ID (residential only) |
timeframe | string | 24hr or 7d (default: 24hr) |
unit is always mb. interval_seconds is the
typical spacing between points. total_mb is the sum of all points in
the window and bandwidth_remaining_mb is the current remaining balance.
used_mb and total_mb are numbers rounded to two decimals;
whole numbers are sent without a fractional part. time values are
Unix seconds, UTC. points is empty until at least two snapshots exist
in the window.
Example Request
curl -H "X-Reseller-Key: your_api_key_here" \ "https://servury.com/api/proxy.php?action=usage&id=abc12345&timeframe=24hr"
Example Response
{
"success": true,
"data": {
"proxy_id": "abc12345",
"timeframe": "24hr",
"unit": "mb",
"interval_seconds": 3600,
"points": [
{"time": 1714000000, "used_mb": 120},
{"time": 1714003600, "used_mb": 0},
{"time": 1714007200, "used_mb": 85}
],
"total_mb": 205,
"bandwidth_remaining_mb": 7350
}
}
?action=create_datacenter
$ PaidOrder datacenter proxies. Returns proxy credentials immediately.
| Parameter | Type | Description |
|---|---|---|
country * | string | US, CA, FR, UK, or NL |
days | integer | 3-365 (default: 30) |
quantity | integer | 1-100 (default: 1) |
ip_type | string | ipv4 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
}
}
?action=create_residential
$ PaidOrder a residential proxy subscription with bandwidth.
| Parameter | Type | Description |
|---|---|---|
bandwidth * | integer | Bandwidth in GB (1-1000) |
?action=create_rotating
$ PaidOrder a rotating IPv6 proxy.
| Parameter | Type | Description |
|---|---|---|
country | string | Currently only CA (default) |
days | integer | 7, 14, 30, 60, or 90 (default: 30) |
threads | integer | 100-5000 (default: 100) |
protocol | string | Currently only ipv6 (default) |
?action=renew&id={proxy_id}
$ PaidRenew a datacenter or rotating proxy. Not applicable to residential (use topup instead).
| Parameter | Type | Description |
|---|---|---|
id * | string | 8-character proxy ID |
days * | integer | Datacenter: 3-365. Rotating: 7/14/30/60/90. |
?action=topup&id={proxy_id}
$ PaidAdd bandwidth to a residential proxy.
| Parameter | Type | Description |
|---|---|---|
id * | string | 8-character proxy ID |
bandwidth * | integer | GB to add (1-1000) |
?action=reset_credentials&id={proxy_id}
Reset proxy username/password. Works for all proxy types. Returns new credentials.
| Parameter | Type | Description |
|---|---|---|
id * | string | 8-character proxy ID |
?action=add_ip&id={proxy_id}
Add an IP to the proxy whitelist (datacenter and rotating only).
| Parameter | Type | Description |
|---|---|---|
id * | string | 8-character proxy ID |
ip * | string | IP address to whitelist |
?action=remove_ip&id={proxy_id}
Remove an IP from the proxy whitelist.
| Parameter | Type | Description |
|---|---|---|
id * | string | 8-character proxy ID |
ip * | string | IP address to remove |
?action=terminate&id={proxy_id}
Permanently delete a proxy (no refund).
| Parameter | Type | Description |
|---|---|---|
id * | string | 8-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
]);







