Reseller API Documentation
Complete API reference for resellers. Default discount starts at 0% and can be increased after demonstrating volume.
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
All endpoints return JSON. Successful responses have {"success": true, "data": {...}}. Errors return {"success": false, "error": "message"}.
Enable reseller mode on your account to send test requests from this page.
?action=plans
List available VPS plans with your reseller pricing.
?action=locations
List available server locations.
?action=os
List available operating systems.
?action=account
Get reseller account information (balance, discount, payment method).
?action=servers
List all servers owned by the reseller.
?action=server&id={server_id}
Get detailed information for a specific server.
{
"success": true,
"data": {
"server": {
"id": "abc12345",
"hostname": "myserver",
"ip_address": "192.168.1.1",
"os": "ubuntu24",
"plan": "S-100",
"location": "USA",
"status": "active",
"username": "root",
"password": "serverpassword123",
"created_at": 1774023699,
"expiration_date": 1776615699
}
}
}
?action=console&id={server_id}
Get noVNC console URL for a server.
?action=create
PaidProvision a new VPS server. This will charge your account.
?action=renew&id={server_id}
PaidRenew/extend a server subscription.
?action=terminate&id={server_id}
Permanently delete a server (no refund).
?action=power&id={server_id}
Execute power actions on a server.
?action=reinstall&id={server_id}
Reinstall the operating system (wipes all data).
?action=hostname&id={server_id}
Update server hostname.
?action=ip&id={server_id}
PaidChange server IP address.
?action=upgrade&id={server_id}
PaidUpgrade server to a higher plan (paid, prorated). Servers can only be upgraded within their product line.
Servers can only be upgraded within their product line. Cross-line upgrades are not supported.
Error Responses
All errors return a JSON object with success: false and an error message.
{
"success": false,
"error": "Invalid or inactive API key."
}
{
"success": false,
"error": "Server not found."
}
{
"success": false,
"error": "Invalid hostname. Use 3-63 alphanumeric characters."
}
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);
}
// Get available plans
$plans = apiRequest("$baseUrl?action=plans", $apiKey);
// Create a server
$newServer = apiRequest("$baseUrl?action=create", $apiKey, 'POST', [
'plan_id' => 5,
'hostname' => 'myserver',
'os' => 'ubuntu24',
'days' => 31
]);
// Power cycle a server
$result = apiRequest("$baseUrl?action=power&id=abc12345", $apiKey, 'POST', [
'action' => 'restart'
]);