Manage countries, servers and configurations using our REST API.
All endpoints require api_key.
GET https://vpnserverhub.com/api/country-list?api_key=YOUR_API_KEY
/fetch-user-details
{
"type": "success",
"user": {
"id": 10,
"name": "Ocean Sims",
"email": "test1@gmail.com",
"expires_at": "2026-01-22"
"total_gb": "15"
}
}
/country-list
| Parameter | Required |
|---|---|
| api_key | Yes |
{
"type": "success",
"data": {
"free": [
{
"id": 1,
"country_code": "CA",
"country_name": "Canada"
}
],
"paid": [
{
"id": 2,
"country_code": "CA",
"country_name": "Canada"
}
]
"platform_free": [
{
"id": 2,
"country_code": "CA",
"country_name": "Canada"
}
]
}
}
/server-list
{
"type": "success",
"wireguard": { "free": [], "paid": [ ... ] },
"v2ray": { "free": [ ... ], "paid": [] }
}
/create-wireguard
| Parameter | Type | Required |
|---|---|---|
| api_key | string | Yes |
| server_id | integer | Yes |
| server_type | string | free/paid |
| expiry_date | datetime | Yes |
| limit | integer | No |
| protocol | string (wireguard) | Yes |
{
"type": "success",
"data": {
"id": 28,
"country": "GERMANY",
"protocol": "wireguard",
"expiry_date": "2025-12-23 08:31",
"status": "ACTIVE",
"created_at": "2026-02-17T10:15:00.000000Z"
}
}
/create-v2ray
| Parameter | Type | Required |
|---|---|---|
| api_key | string | Yes |
| server_ids[] | integer | Yes |
| server_type | string | free/paid |
| protocol | string (vless, vmess, shadowsocks, trojan) | Yes |
| expiry_date | datetime | Yes |
| limit | integer | No |
| device_limit | integer | No |
{
"type": "success",
"message": "Successfully created!",
"data": {
"uuid": "1e70d20d-6e1f-426d-a75f-e4dc6bab8a54",
"id": 23035,
"shortUuid": "RgZo_M4nAgCGB4-A",
"username": "user_free_6a8dd2151da3d",
"status": "ACTIVE",
"trafficLimitBytes": 2147483648,
"trafficLimitStrategy": "MONTH",
"expireAt": "2026-09-01T17:34:11.743Z",
"telegramId": null,
"email": "user@gmail.com",
"description": null,
"tag": null,
"hwidDeviceLimit": 0,
"externalSquadUuid": null,
"trojanPassword": "A5V3eF_nbotah87R4Q3kphcnj3CfHfSd",
"vlessUuid": "eb26c58c-3aa4-4e29-aa84-21b7d2f55054",
"ssPassword": "qzEvDZqnxTv_kB95hjpdG0QCNz7CK0st",
"lastTriggeredThreshold": 0,
"subRevokedAt": null,
"lastTrafficResetAt": null,
"createdAt": "2026-08-25T17:34:13.580Z",
"updatedAt": "2026-08-25T17:34:13.579Z",
"subscriptionUrl": "https://sub.vpnserverhub.com/RgZo_M4nAgCGB4-A",
"activeInternalSquads": [
{
"uuid": "d0fc1207-9eeb-4fbc-a6f1-58fce4459153",
"name": "Poland-Vless"
},
{
"uuid": "731bfef2-a756-4ad0-9271-d7420e0c45a4",
"name": "Netherlands-Vless"
}
],
"userTraffic": {
"usedTrafficBytes": 0,
"lifetimeUsedTrafficBytes": 0,
"onlineAt": null,
"lastConnectedNodeUuid": null,
"firstConnectedAt": null
}
}
}
Enable, disable, or change the expiry date of one or multiple WireGuard server configurations.
/wireguard/update
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | User API key |
| ids | array | Yes | Server config IDs to update |
| enable | boolean | No |
true to enable or
false to disable
|
| expiry_date | date | No |
Expiry date in Y-m-d format
|
enable or expiry_date.
Both can also be provided in the same request.
{
"api_key": "YOUR_API_KEY",
"ids": [12, 15, 20],
"enable": true
}
{
"api_key": "YOUR_API_KEY",
"ids": [12, 15, 20],
"enable": false
}
{
"api_key": "YOUR_API_KEY",
"ids": [12, 15, 20],
"expiry_date": "2026-09-30"
}
{
"api_key": "YOUR_API_KEY",
"ids": [12, 15, 20],
"enable": true,
"expiry_date": "2026-09-30"
}
{
"type": "success",
"message": "3 server(s) enabled successfully.",
"success": [
{
"id": 12
},
{
"id": 15
},
{
"id": 20
}
],
"failed": []
}
{
"type": "warning",
"message": "2 server(s) enabled successfully, 1 failed.",
"success": [
{
"id": 12
},
{
"id": 15
}
],
"failed": [
{
"id": 20,
"message": "Inbound ID not found"
}
]
}
Enable, disable, or change the expiry date of one or multiple V2Ray server configurations.
/v2ray/update
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | User API key |
| uuids | array | Yes | Array of clean V2Ray user UUIDs |
| status | string | No |
ACTIVE or DISABLED
|
| expiry_date | date | No |
Expiry date in Y-m-d format
|
status or expiry_date.
Both can be provided in the same request.
{
"api_key": "YOUR_API_KEY",
"uuids": [
"764a1d91-a8c8-4e93-9354-25e4959b3254",
"12345678-abcd-1234-abcd-123456789012"
],
"status": "ACTIVE"
}
{
"api_key": "YOUR_API_KEY",
"uuids": [
"764a1d91-a8c8-4e93-9354-25e4959b3254",
"12345678-abcd-1234-abcd-123456789012"
],
"status": "DISABLED"
}
{
"api_key": "YOUR_API_KEY",
"uuids": [
"764a1d91-a8c8-4e93-9354-25e4959b3254",
"12345678-abcd-1234-abcd-123456789012"
],
"expiry_date": "2026-09-30"
}
{
"api_key": "YOUR_API_KEY",
"uuids": [
"764a1d91-a8c8-4e93-9354-25e4959b3254",
"12345678-abcd-1234-abcd-123456789012"
],
"status": "ACTIVE",
"expiry_date": "2026-09-30"
}
{
"type": "success",
"message": "2 server(s) status updated successfully.",
"success": [
{
"server_id": 1,
"uuids": [
"764a1d91-a8c8-4e93-9354-25e4959b3254",
"12345678-abcd-1234-abcd-123456789012"
]
}
],
"failed": []
}
Visual guide to find your API key in dashboard