Hosting Account Orchestration API
Every BoostonCP server node exposes a native, high-performance orchestration gateway over administrative Port 2087 (e.g. https://YOUR_SERVER_IP:2087/api/whmcs.php). This API manages the complete hosting lifecycle—creating user accounts, configuring virtual hosts (Nginx, Apache, OpenLiteSpeed), enforcing kernel-level cgroups v2 resource quotas, handling automated billing suspensions, package upgrades, and generating cryptographic Single Sign-On (SSO) tokens.
Authentication Protocol
Authentication is performed via your Server API Access Hash generated inside the BoostonCP Admin Panel (Security > API Keys). You may pass the credential via either:
- HTTP Header:
X-Booston-API-Key: YOUR_API_ACCESS_HASH(Recommended for security) - POST / GET Parameter:
api_key=YOUR_API_ACCESS_HASH
01. Create Hosting Account
Provisions a new isolated system user account. Automatically creates /home/{username}/public_html, binds designated webserver vhosts, establishes isolated MySQL wildcard permissions ({username}_%), provisions FTP credentials, and attaches package resource limits.
REQUEST PARAMETERS
| Parameter | Type | Status | Description |
|---|---|---|---|
| username | string | Required | Linux system username (alphanumeric, 3-16 characters, lowercase). |
| password | string | Required | Account password (used for SSH, FTP, and MySQL master user). |
| domain | string | Optional | Primary website domain (e.g. example.com). Auto-builds Nginx/Apache vhost. |
| string | Optional | Client email address for notifications and account recovery. | |
| package_id | integer | Optional | ID of the hosting package to bind quotas and cgroups limits. |
curl -X POST "https://YOUR_SERVER_IP:2087/api/whmcs.php?action=create" \
-H "X-Booston-API-Key: YOUR_API_ACCESS_HASH" \
-d "username=john_client" \
-d "password=SecurePassword123!" \
-d "[email protected]" \
-d "domain=johndoe.com" \
-d "package_id=2"
<?php
$apiKey = 'YOUR_API_ACCESS_HASH';
$serverIp = 'YOUR_SERVER_IP';
$ch = curl_init("https://{$serverIp}:2087/api/whmcs.php?action=create");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"X-Booston-API-Key: {$apiKey}"
],
CURLOPT_POSTFIELDS => http_build_query([
'username' => 'john_client',
'password' => 'SecurePassword123!',
'email' => '[email protected]',
'domain' => 'johndoe.com',
'package_id' => 2
]),
CURLOPT_SSL_VERIFYPEER => false, // Set true if using official domain SSL
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
?>
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'X-Booston-API-Key' => config('services.booston.api_key'),
])->withoutVerifying()
->asForm()
->post("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=create", [
'username' => 'john_client',
'password' => 'SecurePassword123!',
'email' => '[email protected]',
'domain' => 'johndoe.com',
'package_id' => 2,
]);
if ($response->successful()) {
$data = $response->json();
// Account successfully initialized!
}
const axios = require('axios');
async function createHostingAccount() {
const params = new URLSearchParams();
params.append('username', 'john_client');
params.append('password', 'SecurePassword123!');
params.append('email', '[email protected]');
params.append('domain', 'johndoe.com');
params.append('package_id', '2');
const response = await axios.post('https://YOUR_SERVER_IP:2087/api/whmcs.php?action=create', params, {
headers: {
'X-Booston-API-Key': process.env.BOOSTON_API_KEY,
'Content-Type': 'application/x-www-form-urlencoded'
}
});
console.log(response.data);
}
createHostingAccount();
import requests
url = "https://YOUR_SERVER_IP:2087/api/whmcs.php?action=create"
headers = {
"X-Booston-API-Key": "YOUR_API_ACCESS_HASH"
}
payload = {
"username": "john_client",
"password": "SecurePassword123!",
"email": "[email protected]",
"domain": "johndoe.com",
"package_id": 2
}
response = requests.post(url, headers=headers, data=payload, verify=False)
data = response.json()
print(data)
{
"status": "success",
"message": "Account created and domain setup initiated."
}
02. Suspend Hosting Account
Freezes account access for non-payment or abuse. Instantly terminates user session tokens, blocks Port 2083 panel login, pauses cron automation, and routes web traffic to the BoostonCP suspended holding page.
REQUEST PARAMETERS
| Parameter | Type | Status | Description |
|---|---|---|---|
| username | string | Required | Target username to suspend. |
curl -X POST "https://YOUR_SERVER_IP:2087/api/whmcs.php?action=suspend" \
-H "X-Booston-API-Key: YOUR_API_ACCESS_HASH" \
-d "username=john_client"
<?php
$ch = curl_init("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=suspend");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-Booston-API-Key: YOUR_API_ACCESS_HASH"],
CURLOPT_POSTFIELDS => ['username' => 'john_client'],
CURLOPT_SSL_VERIFYPEER => false,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
?>
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'X-Booston-API-Key' => config('services.booston.api_key'),
])->withoutVerifying()->asForm()->post("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=suspend", [
'username' => 'john_client'
]);
const axios = require('axios');
const params = new URLSearchParams({ username: 'john_client' });
const res = await axios.post('https://YOUR_SERVER_IP:2087/api/whmcs.php?action=suspend', params, {
headers: { 'X-Booston-API-Key': process.env.BOOSTON_API_KEY }
});
import requests
res = requests.post(
"https://YOUR_SERVER_IP:2087/api/whmcs.php?action=suspend",
headers={"X-Booston-API-Key": "YOUR_API_ACCESS_HASH"},
data={"username": "john_client"},
verify=False
)
{
"status": "success",
"message": "Account suspended."
}
03. Unsuspend Hosting Account
Reactivates an account immediately upon invoice settlement. Unlocks panel login, restores original web vhosts, and unpauses cron automation.
REQUEST PARAMETERS
| Parameter | Type | Status | Description |
|---|---|---|---|
| username | string | Required | Target username to restore. |
curl -X POST "https://YOUR_SERVER_IP:2087/api/whmcs.php?action=unsuspend" \
-H "X-Booston-API-Key: YOUR_API_ACCESS_HASH" \
-d "username=john_client"
<?php
$ch = curl_init("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=unsuspend");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-Booston-API-Key: YOUR_API_ACCESS_HASH"],
CURLOPT_POSTFIELDS => ['username' => 'john_client'],
CURLOPT_SSL_VERIFYPEER => false,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
?>
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'X-Booston-API-Key' => config('services.booston.api_key'),
])->withoutVerifying()->asForm()->post("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=unsuspend", [
'username' => 'john_client'
]);
const axios = require('axios');
const params = new URLSearchParams({ username: 'john_client' });
const res = await axios.post('https://YOUR_SERVER_IP:2087/api/whmcs.php?action=unsuspend', params, {
headers: { 'X-Booston-API-Key': process.env.BOOSTON_API_KEY }
});
import requests
res = requests.post(
"https://YOUR_SERVER_IP:2087/api/whmcs.php?action=unsuspend",
headers={"X-Booston-API-Key": "YOUR_API_ACCESS_HASH"},
data={"username": "john_client"},
verify=False
)
{
"status": "success",
"message": "Account unsuspended."
}
04. Change Package (Upgrade / Downgrade)
Seamlessly upgrades or downgrades an account to a new package tier. BoostonCP immediately synchronizes Linux kernel cgroups v2 resource ceilings (CPU speed %, RAM MB, IOPS, Entry Processes) with zero server downtime.
REQUEST PARAMETERS
| Parameter | Type | Status | Description |
|---|---|---|---|
| username | string | Required | Account username to update. |
| package_id | integer | Required | New package ID to apply. |
curl -X POST "https://YOUR_SERVER_IP:2087/api/whmcs.php?action=change_package" \
-H "X-Booston-API-Key: YOUR_API_ACCESS_HASH" \
-d "username=john_client" \
-d "package_id=5"
<?php
$ch = curl_init("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=change_package");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-Booston-API-Key: YOUR_API_ACCESS_HASH"],
CURLOPT_POSTFIELDS => [
'username' => 'john_client',
'package_id' => 5
],
CURLOPT_SSL_VERIFYPEER => false,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
?>
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'X-Booston-API-Key' => config('services.booston.api_key'),
])->withoutVerifying()->asForm()->post("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=change_package", [
'username' => 'john_client',
'package_id' => 5,
]);
const axios = require('axios');
const params = new URLSearchParams({ username: 'john_client', package_id: '5' });
const res = await axios.post('https://YOUR_SERVER_IP:2087/api/whmcs.php?action=change_package', params, {
headers: { 'X-Booston-API-Key': process.env.BOOSTON_API_KEY }
});
import requests
res = requests.post(
"https://YOUR_SERVER_IP:2087/api/whmcs.php?action=change_package",
headers={"X-Booston-API-Key": "YOUR_API_ACCESS_HASH"},
data={"username": "john_client", "package_id": 5},
verify=False
)
{
"status": "success",
"message": "Package changed to 'Turbo Enterprise' successfully.",
"package_id": 5,
"package_name": "Turbo Enterprise"
}
05. Terminate Hosting Account
Permanently wipes an account from the system node. Deletes home directory files, drops user databases, removes DNS zones, and purges system identity.
REQUEST PARAMETERS
| Parameter | Type | Status | Description |
|---|---|---|---|
| username | string | Required | Target username to purge permanently. |
curl -X POST "https://YOUR_SERVER_IP:2087/api/whmcs.php?action=terminate" \
-H "X-Booston-API-Key: YOUR_API_ACCESS_HASH" \
-d "username=john_client"
<?php
$ch = curl_init("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=terminate");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-Booston-API-Key: YOUR_API_ACCESS_HASH"],
CURLOPT_POSTFIELDS => ['username' => 'john_client'],
CURLOPT_SSL_VERIFYPEER => false,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
?>
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'X-Booston-API-Key' => config('services.booston.api_key'),
])->withoutVerifying()->asForm()->post("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=terminate", [
'username' => 'john_client'
]);
const axios = require('axios');
const params = new URLSearchParams({ username: 'john_client' });
const res = await axios.post('https://YOUR_SERVER_IP:2087/api/whmcs.php?action=terminate', params, {
headers: { 'X-Booston-API-Key': process.env.BOOSTON_API_KEY }
});
import requests
res = requests.post(
"https://YOUR_SERVER_IP:2087/api/whmcs.php?action=terminate",
headers={"X-Booston-API-Key": "YOUR_API_ACCESS_HASH"},
data={"username": "john_client"},
verify=False
)
{
"status": "success",
"message": "Account terminated."
}
06. 1-Click Single Sign-On (SSO)
Generates an encrypted, single-use, 300-second bridge token allowing your clients to log in straight into their Port 2083 User Panel from WHMCS or your custom client dashboard without exposing or typing their password.
REQUEST PARAMETERS
| Parameter | Type | Status | Description |
|---|---|---|---|
| username | string | Required | Username to generate login bridge token for. |
curl -X POST "https://YOUR_SERVER_IP:2087/api/whmcs.php?action=user_login" \
-H "X-Booston-API-Key: YOUR_API_ACCESS_HASH" \
-d "username=john_client"
<?php
$ch = curl_init("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=user_login");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["X-Booston-API-Key: YOUR_API_ACCESS_HASH"],
CURLOPT_POSTFIELDS => ['username' => 'john_client'],
CURLOPT_SSL_VERIFYPEER => false,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
if (!empty($data['login_url'])) {
header("Location: " . $data['login_url']);
exit;
}
?>
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'X-Booston-API-Key' => config('services.booston.api_key'),
])->withoutVerifying()->asForm()->post("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=user_login", [
'username' => 'john_client'
]);
if ($response->successful()) {
$loginUrl = $response->json('login_url');
return redirect()->away($loginUrl);
}
const axios = require('axios');
const params = new URLSearchParams({ username: 'john_client' });
const res = await axios.post('https://YOUR_SERVER_IP:2087/api/whmcs.php?action=user_login', params, {
headers: { 'X-Booston-API-Key': process.env.BOOSTON_API_KEY }
});
console.log('Redirect user to:', res.data.login_url);
import requests
res = requests.post(
"https://YOUR_SERVER_IP:2087/api/whmcs.php?action=user_login",
headers={"X-Booston-API-Key": "YOUR_API_ACCESS_HASH"},
data={"username": "john_client"},
verify=False
)
print("Single Sign-On URL:", res.json().get('login_url'))
{
"status": "success",
"login_url": "https://your-server.com:2083/?login_token=4a7c1b5e8f9d012a..."
}
07. List Hosting Packages
Retrieves all active client hosting packages configured on the server node. Useful for dynamically populating drop-down packages inside your billing portal.
curl -X GET "https://YOUR_SERVER_IP:2087/api/whmcs.php?action=list_packages" \
-H "X-Booston-API-Key: YOUR_API_ACCESS_HASH"
<?php
$ch = curl_init("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=list_packages");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Booston-API-Key: YOUR_API_ACCESS_HASH"],
CURLOPT_SSL_VERIFYPEER => false,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data['packages']);
?>
use Illuminate\Support\Facades\Http;
$packages = Http::withHeaders([
'X-Booston-API-Key' => config('services.booston.api_key'),
])->withoutVerifying()->get("https://YOUR_SERVER_IP:2087/api/whmcs.php?action=list_packages")
->json('packages');
const axios = require('axios');
const res = await axios.get('https://YOUR_SERVER_IP:2087/api/whmcs.php?action=list_packages', {
headers: { 'X-Booston-API-Key': process.env.BOOSTON_API_KEY }
});
console.log(res.data.packages);
import requests
res = requests.get(
"https://YOUR_SERVER_IP:2087/api/whmcs.php?action=list_packages",
headers={"X-Booston-API-Key": "YOUR_API_ACCESS_HASH"},
verify=False
)
print(res.json().get('packages'))
{
"status": "success",
"packages": [
{ "id": 1, "name": "Basic Cloud" },
{ "id": 2, "name": "Pro WordPress" },
{ "id": 5, "name": "Turbo Enterprise" }
]
}