Introduction
API Endpoints
https://api.wlvpn.com
Welcome to the White Label VPN API! In order to access our API, you must have a Reseller account. To get started with a reseller account, please contact our support team. As a reseller, you will be able to use this API to manage your accounts.
This API uses JSON for a response format for all API endpoints including errors.
Authentication
To authorize, use this code:
$ curl -u 'api-key:<api-key>' https://api.wlvpn.com/
Make sure to replace
<api-key>with your API key.
WLVPN utilizes API keys to authenticate valid requests. To request an API Key please contact support.
Authentication against the WLVPN API is performed via
HTTP Basic Auth. When making API
requests, pass the API Key as the password and api-key as the username.
Errors
All API endpoints in the /v2 API will return a api_status field that will have a value of 0 or
1. This field can be used to determine the success or a failure of an API call. When an error is
returned from the API, indicated by api_status = 0, an error key will be sent in the response to
indicate why the error occurred.
The API uses the following error codes:
| Status Code | Meaning |
|---|---|
| 200 - OK | Everything worked as expected. |
| 400 - Bad Request | The request was unacceptable. |
| 401 - Unauthorized | No valid API key was provided. |
| 404 - Not Found | The requested resource does not exist. |
| 410 - Gone | The requested resource has been removed from our servers. |
| 429 - Too Many Requests | You are sending too many requests! Slow down! |
| 500, 502, 503 - Server Errors | We had a problem with our server. Try again later. |
Accounts
The Accounts API allows you to manage the users that have access to the VPN Platform through your reseller account. With this API, you can retrieve and update your Reseller accounts. You can also check to see if a username already exists on your account.
The Account object
Example Account object
{
"cust_id": 24952,
"cust_user_id": "account_124x",
"cust_password": null,
"open_date": "2017-03-24",
"close_date": "0000-00-00",
"acct_status_id": 1,
"acct_group_id": 123,
"user_throttled": 0,
"metadata": {
"internal_account_id": "your-account-id",
"internal_subscription_id": "your-subscription-id"
},
"plans_info": null
}
| Attributes | |
|
cust_id
integer
|
The internal ID given to the account. This ID can be used to retrieve the account in future requests or update the account. |
|
cust_user_id
string
|
The account username that should be used when authenticating the account to the VPN platform and APIs. This value must be a unique across all usernames tied to your Reseller account, and be no more than 60 characters in length. |
|
cust_password
string
|
The password that should be used for authentication against the VPN Platform and the APIs. This value is a write-only value and will not be provided when fetching an existing account. We use a one-way hash algorithm to secure the value in our system and to ensure the value cannot be read by any internal systems. |
|
open_date
string
|
The date in our internal system that the account was opened. This value is read-only and cannot be updated. |
|
close_date
string
|
The date in our internal system that the account was closed. This value
can be updated. This value is automatically set when an account's status is changed
to closed. When the account is active, this value will be |
|
acct_status_id
integer
|
The status of the account in our system. Possible values:
This value is updatable. |
|
acct_group_id
integer
|
The group to which this account belongs. This is a way to organize and restrict accounts in the platform. Groups can be created in the Control Panel. |
|
user_throttled
integer
|
This flag is set to 1 if the account's bandwidth is currently throttled, otherwise it's set to 0 |
|
metadata
dictonary
|
A dictionary of additional key value pairs to be stored against the account, for example an account id or subscription id from your own systems. |
|
plans_info
object
|
Information about the user's plans, the |
The PlansInfo object
Example PlansInfo object
{
"current_plan": {
"id": 733,
"is_unlimited": true,
"code": "premium_1y",
"name": "Premium 1 year",
"short_desc": "Premium 1 year",
"source": "manual",
"purchase_id": 636,
"created_at": null,
"starts_at": 1703090682,
"expires_at": 1734626682,
"bytes_used": null,
"bytes_max": null,
"refilling_interval_days": 0,
"is_revoked": false
},
"pending_plans": [
{
"id": 731,
"is_unlimited": false,
"code": "30_gb_1mo",
"name": "30GB for 1 month",
"short_desc": "30GB for 1 month",
"source": "manual",
"purchase_id": 637,
"created_at": 1700498142,
"starts_at": null,
"expires_at": null,
"bytes_used": 0,
"bytes_max": 32212254720,
"refilling_interval_days": 0,
"is_revoked": false
}
],
"spent_plans": [
{
"id": 732,
"is_unlimited": true,
"code": "1mo_unlimited",
"name": "1 Month Unlimited",
"short_desc": "1 Month Unlimited",
"source": "manual",
"purchase_id": 638,
"created_at": null,
"starts_at": 1700498682,
"expires_at": 1603090682,
"bytes_used": null,
"bytes_max": null,
"refilling_interval_days": 0,
"is_revoked": false
},
{
"id": 730,
"is_unlimited": false,
"code": "freemium_1gb_per_day",
"name": "Freemium 1GB per day",
"short_desc": "Freemium 1GB per day",
"source": "manual",
"purchase_id": 639,
"created_at": 1700498967,
"starts_at": null,
"expires_at": 1699366946,
"bytes_used": 0,
"bytes_max": 1073741824,
"refilling_interval_days": 1,
"is_revoked": false
}
]
}
| Attributes | |
|
current_plan
object
|
The current active plan of the user, a |
|
pending_plans
array
|
A list of plans that are pending, array of |
|
spent_plans
array
|
A list of plans that the user has already used (or that are expired / revoked), array of |
The PlanInfoItem object
Example PlanInfoItem object
{
"id": 733,
"is_unlimited": true,
"code": "premium_1y",
"name": "Premium 1 year",
"short_desc": "Premium 1 year",
"source": "manual",
"purchase_id": 636,
"created_at": null,
"starts_at": 1703090682,
"expires_at": 1734626682,
"bytes_used": null,
"bytes_max": null,
"refilling_interval_days": 0,
"is_revoked": false
}
| Attributes | |
|
id
integer
|
Unique identifier of the plan. It will be |
|
is_unlimited
boolean
|
Indicates whether the plan is unlimited (time-based) |
|
code
string
|
Unique code identifier of the plan. It will be |
|
name
string
|
Name of the plan. It will be |
|
short_desc
string
|
Short description of the plan. It will be |
|
source
string
|
Source of the plan. It will be |
|
purchase_id
integer
|
Unique identifier of the purchase. |
|
created_at
integer
|
Timestamp when the plan was created. It's set for bandwidth-based plans only. |
|
starts_at
integer
|
Timestamp when the plan starts. Will be |
|
expires_at
integer
|
Timestamp when the plan expires. Will be |
|
bytes_used
integer
|
Number of bytes used. It will be |
|
bytes_max
integer
|
Maximum number of bytes that can be transferred before the plan expires. Will be |
|
refilling_interval_days
integer
|
The number of days after which the bandwidth plan will be automatically refilled. This field is set to 0 if refilling is disabled and for time-based plans. |
|
is_revoked
boolean
|
Indicates whether the plan is revoked |
The UsageReport Object
Example UsageReport object
{
"usage": [
{
"name": "bandwidth",
"namespace": "vpn",
"value": 124912012412424,
"unit": "Bytes"
},
{
"name": "connections",
"namespace": "vpn",
"value": 10,
"unit": "None"
}
]
}
| Attributes | |
|
usage
array
|
Usage datapoints for the requested time period. Each datapoint will contain a type that indicates what the value represents |
Creating an account
Example Request
$ curl https://api.wlvpn.com/v2/customers/ \
-H 'Content-Type: application/json' \
-u 'api-key:<api-key>' \
-d '{
"cust_user_id": "account_xqst335",
"cust_password": "<token-value>",
"acct_group_id": 54,
"metadata": {
"internal_account_id": "your-account-id",
"internal_subscription_id": "your-subscription-id"
}
}'
Example response
{
"api_status": 1,
"cust_id": 2423
}
Creates an account that can be used to authenticate against the VPN Platform.
Request Object
| Attributes | |
|
cust_user_id
string
Required
|
Customer's username. |
|
cust_password
string
Required
|
Customer's password |
|
acct_group_id
integer
Required
|
Account group ID to create the customer with. These are found within your reseller dashboard. |
|
close_date
string
|
If given, causes the customer to be created with an explicit close date (e.g. "YYYY-MM-DD"). |
|
metadata
dictionary
|
Any additional metadata to store against the account, up to a maximum of 5 keys |
Returns
When a request is successful and the account is created, the cust_id will be returned in the
response body with the ID that was created for the account. When the request fails, the error key
in the response will have more information on why the request failed.
Updating an account
Example request #1 (updating an account by ID)
$ curl -X PUT https://api.wlvpn.com/v2/customers/2432 \
-H 'Content-Type: application/json' \
-u 'api-key:<api-key>' \
-d '{
"cust_password": "newpassword",
"close_date": "2020-01-01",
"acct_status_id": 1,
"acct_group_id": 32,
"metadata": {
"subscription_type": "Free"
}
}'
Example request #2 (updating an account by username)
$ curl -X PUT https://api.wlvpn.com/v2/customers/username/demoAndroid \
-H 'Content-Type: application/json' \
-u 'api-key:<api-key>' \
-d '{
"cust_password": "newpassword",
"acct_status_id": 1
}'
Example response
{
"api_status": 1
}
Updates information for an account in the VPN Platform by ID or username. The only properties that we support updating
are close_date, cust_password, acct_status_id, acct_group_id and metadata.
All other properties are considered read-only.
To close an account, set acct_status_id to 3.
You can set it back to 1 to re-open a closed account.
Use close_date if you want to have an account automatically closed by some specific date in the future.
By default, all accounts have value 0000-00-00, which means "not set".
Note that metadata is always overwritten with this request, please include any existing keys you want to retain
Returns
When the request is successful, no parameters besides api_status are returned. In the event the
request fails, the response will contain an error field that can be used to determine the error.
Anonymising a customer
Example Request
$ curl -X PUT https://api.wlvpn.com/v2/customers/2432/anonymise \
-H 'Content-Type: application/json' \
-u 'api-key:<api-key>'
Example response
{
"api_status": 1
}
This will close the account, anonymise the username and remove any associated metadata.
We recommend you call this function once a customer has been closed and the account won't be reopened again in the future
Returns
When the request is successful, no parameters besides api_status are returned. In the event the
request fails, the response will contain an error field that can be used to determine the error.
Retrieving a customer
Example request #1 (retrieving a customer by ID)
$ curl -X GET https://api.wlvpn.com/v2/customers/32749318/ \
-u 'api-key:<api-key>'
Example request #2 (retrieving a customer by username)
$ curl -X GET https://api.wlvpn.com/v2/customers/username/demoAndroid/ \
-u 'api-key:<api-key>'
Example response
{
"api_status": 1,
"customer":
{
"cust_id": 160669345,
"cust_user_id": "demoAndroid",
"close_date": "0000-00-00",
"open_date": "2020-06-11",
"acct_status_id": 1,
"acct_group_id": 2052,
"user_throttled": 0,
"used_service": 0,
"metadata": {
"internal_account_id": "your-account-id",
"internal_subscription_id": "your-subscription-id"
},
"plans_info": {
"current_plan": {
"id": 733,
"is_unlimited": true,
"code": "premium_1y",
"name": "Premium 1 year",
"short_desc": "Premium 1 year",
"source": "manual",
"purchase_id": 636,
"created_at": null,
"starts_at": 1703090682,
"expires_at": 1734626682,
"bytes_used": null,
"bytes_max": null,
"refilling_interval_days": 0,
"is_revoked": false
},
"pending_plans": [
{
"id": 731,
"is_unlimited": false,
"code": "30_gb_1mo",
"name": "30GB for 1 month",
"short_desc": "30GB for 1 month",
"source": "manual",
"purchase_id": 637,
"created_at": 1700498142,
"starts_at": null,
"expires_at": null,
"bytes_used": 0,
"bytes_max": 32212254720,
"refilling_interval_days": 0,
"is_revoked": false
}
],
"spent_plans": [
{
"id": 732,
"is_unlimited": true,
"code": "1mo_unlimited",
"name": "1 Month Unlimited",
"short_desc": "1 Month Unlimited",
"source": "manual",
"purchase_id": 638,
"created_at": null,
"starts_at": 1700498682,
"expires_at": 1603090682,
"bytes_used": null,
"bytes_max": null,
"refilling_interval_days": 0,
"is_revoked": false
}
]
}
}
}
It allows retrieving account info by customer ID or username.
Returns
When the request is successful, it returns account info. In the event the
request fails, the response will contain an error field that can be used to determine the error.
Retrieving a list of customers
Example request
$ curl -X GET https://api.wlvpn.com/v2/customers/paged/?page=1&page_size=100&open_date=2024-12-04 \
-u 'api-key:<api-key>'
Example response
{
"api_status": 1,
"result_count": 2,
"page": 1,
"page_size": 100,
"customers": [
{
"cust_id": 12749638,
"cust_user_id": "account_xqst335",
"close_date": "2025-05-21",
"open_date": "2024-12-04",
"acct_status_id": 5,
"acct_group_id": 1525,
"user_throttled": 0,
"used_service": 0
},
{
"cust_id": 12749639,
"cust_user_id": "account_xqst336",
"close_date": "2025-05-21",
"open_date": "2024-12-04",
"acct_status_id": 1,
"acct_group_id": 1525,
"user_throttled": 0,
"used_service": 0
},
]
It allows retrieving a list of customers split by pages. It also allows filtering records by some fields.
Optional query parameters:
page— [Positive integer] — Number of page. The default value is1page_size— [Positive integer] — Count of records on a page. The default value is1000; the maximum value is100000.
You can filter records by the following fields:
acct_status_id— [Positive integer]acct_group_id— [Positive integer]open_date— [Date in theYYYY-MM-DDformat]
Returns
When the request is successful, it returns a list of customers.
In the event the request fails, the response will contain an error field that can be used to determine the error.
Check username exists
Example request
$ curl 'https://api.wlvpn.com/v2/customers/username_exists/account_x213' \
-u 'api-key:<api-key>'
Example response
{
"api_status": 1,
"username_exists": 1
}
This API endpoint provides a way of checking if a username is already taken in your accounts. This can be used to ensure that the accounts you attempt to create are unique.
Returns
Returns whether an account with the provided username exists. This can be checked using the
username_exists field returned from the API.
Create usage report
Example request
$ curl -X POST 'https://api.wlvpn.com/v2/customers/1242/usage-report' \
-u 'api-key:<api-key>' \
-d '{
"start_date": "2017-01-02",
"end_date": "2017-02-02",
"metrics": [
{
"name": "bandwidth",
"namespace": "vpn"
},
{
"name": "connections",
"namespace": "vpn"
}
]
}'
Example response
{
"usage": [
{
"name": "bandwidth",
"namespace": "vpn",
"value": 12492350235,
"unit": "Bytes"
},
{
"name": "connections",
"namespace": "vpn",
"value": 35,
"unit": "None"
}
]
}
This API endpoint allows you to retrieve total usage information for a customer based on a specified time period.
Request Object
| Attributes | |
|
start_date
string
Required
|
The start date that should be used when gathering reporting data. This date should be in UTC. The value is
inclusive. For example, requesting the bandwidth data for a customer with a start date
of |
|
end_date
string
|
This value will be the end date of the data that should be used when gathering reporting
data. The date should be in UTC. This value is inclusive. For example, requesting bandwidth data for a customer
with an end date of |
|
metrics
array
|
This value should be an array of metrics that you wish to get back from the API. |
Create bulk usage report
Example request
$ curl -X GET https://api.wlvpn.com/v2/customers/usage-report/?start_date=2025-06-07&max_results=2&cust_id_offset=32749850 \
-u 'api-key:<api-key>'
Example response
{
"customers": [
{
"cust_id": 32749851,
"bandwidth": 0,
"connections": 1
},
{
"cust_id": 32749853,
"bandwidth": 214292803,
"connections": 3
}
],
"last_cust_id": 32749853,
"result_count": 2,
"total_count": 27875
}
This API endpoint allows you to retrieve total usage information based on a specified
time period in bulk. It returns data in chunks of 5000 customers (this value can be changed).
In addition to usage records, it contains some metadata such as last_cust_id (the last cust_id in the result,
which can be used in the next query to get the next chunk of data), result_count (the number of report records
returned), and total_count (the total number of records available).
Request Object
| Attributes | |
|
start_date
string
Required
|
The start date that should be used when gathering reporting data. The date should be in UTC. This value is
inclusive. For example, requesting the bandwidth data for customers with a start date
of |
|
end_date
string
|
This value will be the end date of the data that should be used when gathering reporting
data. The date should be in UTC. This value is inclusive. For example, requesting bandwidth data for customers
with an end date of |
|
max_results
integer
|
This parameter specifies the number of customers you want to retrieve in one request.
It is optional and by default equals |
|
cust_id_offset
integer
|
This parameter specifies the cust_id after which the endpoint should retrieve data.
By default, it is not specified, which means it will start from the very first customer.
You should use the |
|
bandwidth_gte
integer
|
Filter results with total bandwidth greater than or equal to the specified value (in bytes). This filter uses OR logic with other filters - metrics matching ANY of the specified filter conditions will be included in results. Can be 0 or any positive integer. |
|
bandwidth_lte
integer
|
Filter results with total bandwidth less than or equal to the specified value (in bytes). This filter uses OR logic with other filters - metrics matching ANY of the specified filter conditions will be included in results. Can be 0 or any positive integer. |
|
connections_gte
integer
|
Filter results with number of connections greater than or equal to the specified value. This filter uses OR logic with other filters - metrics matching ANY of the specified filter conditions will be included in results. Can be 0 or any positive integer. |
|
connections_lte
integer
|
Filter results with number of connections less than or equal to the specified value. This filter uses OR logic with other filters - metrics matching ANY of the specified filter conditions will be included in results. Can be 0 or any positive integer. |
Create limitations
Example request
$ curl -X POST https://api.wlvpn.com/v2/customers/3525/limitations \
-H 'Content-Type: application/json' \
-u 'api-key:<api-key>' \
-d '{
"limitations": [
{
"type": "rate-limit",
"value": 41294102
}
]
}'
Example response
HTTP/1.1 204 No Content
This API endpoint allows you to apply a set of limitations on a customers account.
Request Object
| Attributes | |
|
type
string
Required
|
This is the type of limitation that should be placed on the account. Currently, the
only supported option is |
|
value
number
Required
|
This is the value of the limitation. For the |
Response
On a successful request, this endpoint will return an empty response.
Update limitation
Example request
$ curl -X PUT https://api.wlvpn.com/v2/customers/3525/limitations \
-H 'Content-Type: application/json' \
-u 'api-key:<api-key>' \
-d '{
"limitations": [
{
"type": "rate-limit",
"value": 41294102
}
]
}'
Example response
HTTP/1.1 204 No Content
This API endpoint allows you to update a set of limitations on a customers account.
Request Object
| Attributes | |
|
type
string
Required
|
This is the type of limitation that should be placed on the account. Currently, the
only supported option is |
|
value
number
Required
|
This is the value of the limitation. For the |
Response
On a successful request, this endpoint will return an empty response.
Delete limitations
Example request
$ curl -X DELETE https://api.wlvpn.com/v2/customers/3525/limitations \
-u 'api-key:<api-key>'
Example response
HTTP/1.1 204 No Content
This API endpoint allows you to remove all limitations on a customer's account
Request Parameters
No parameters!
Response
A successful request will return an empty response.
Expire or delete auth tokens
Example request
$ curl -X PUT https://api.wlvpn.com/v2/customers/3525/tokens \
-H 'Content-Type: application/json' \
-u 'api-key:<api-key>' \
-d '{
"token_action": "Expire"
}'
Example response
{
"api_status": 1
}
This API endpoint allows you to remove all customer's auth tokens or expire access tokens.
Request Parameters
| Attributes | |
|
token_action
string
Required
|
The action to be performed on customer's auth tokens currently supports two values:
|
Response
A successful request will return {"api_status": 1} with HTTP status 200 OK.
Plans
The Plans API allows you:
- to retrieve a list of plans which were created via the dashboard for your account
- to allocate bandwidth or unlimited service to users based on some plan
- to revoke allocated service
There are two types of plans:
- Time-based plans (subscriptions) - for such plans only
interval_daysis valuable andbandwidth_mb/bandwidth_gbarenull - Bandwidth-based plans, for them
bandwidth_mb/bandwidth_gbare valuable andinterval_daysisnull
The Plan object
Example plan object
{
"plan_code": "coolvpn_one_month_unlimited",
"name": "One month service",
"short_desc": "Unlimited usage",
"price": "0",
"bandwidth_gb": null,
"bandwidth_mb": null,
"interval_days": 30,
"expire_after_days": null,
"requires_receipt": false,
"is_auto_renewing": false,
"refilling_interval_days": 0
}
| Attributes | |
|
plan_code
string
|
Unique identifier |
|
name
string
|
Plan name |
|
short_desc
string
|
Short plan description |
|
price
string
|
Price in |
|
bandwidth_gb
integer
|
Amount of |
|
bandwidth_mb
integer
|
Amount of |
|
interval_days
integer
|
Time-based plan duration in |
|
expire_after_days
integer
|
Bandwidth-based plan lifetime in |
|
requires_receipt
boolean
|
It should be |
|
is_auto_renewing
boolean
|
true for auto-renewable time-based plans |
|
refilling_interval_days
integer
|
The number of days after which the bandwidth plan will be automatically refilled. This field is set to 0 if refilling is disabled and for time-based plans. |
List all plans
Example request
$ curl 'https://api.wlvpn.com/v2/plans' \
-u 'api-key:<api-key>'
Example response
{
"api_status": 1,
"plans": [
{
"plan_code": "coolvpn_one_month_unlimited",
"name": "One month service",
"short_desc": "Unlimited usage",
"price": "0",
"bandwidth_gb": null,
"bandwidth_mb": null,
"interval_days": 30,
"expire_after_days": null,
"requires_receipt": false,
"is_auto_renewing": false,
"refilling_interval_days": 0
},
{
"plan_code": "coolvpn_default",
"name": "Default",
"short_desc": "Default",
"price": "0",
"bandwidth_gb": null,
"bandwidth_mb": 51200,
"interval_days": null,
"expire_after_days": null,
"requires_receipt": false,
"is_auto_renewing": false,
"refilling_interval_days": 30
}
]
}
Retrieves a list of plans that you can allocate to users.
Returns
On a successful request, the plans field will contain a map of plans.
Allocate purchase to a customer
Example Request
$ curl https://api.wlvpn.com/v2/customers/12749163/purchase/ \
-H 'Content-Type: application/json' \
-u 'api-key:<api-key>' \
-d '{
"plan_code": "30_gb_1mo",
"refilling_time": "17:00",
"refilling_time_offset": "+03:00"
}'
Example response
{
"api_status": 1,
"plan_info": {
"id": 731,
"is_unlimited": false,
"code": "30_gb_1mo",
"name": "30GB for 1 month",
"short_desc": "30GB for 1 month",
"source": "manual",
"purchase_id": 637,
"created_at": 1700498142,
"starts_at": null,
"expires_at": null,
"bytes_used": 0,
"bytes_max": 32212254720,
"refilling_interval_days": 0,
"is_revoked": false
}
}
Allocates service to a customer based on one of the available plans
Request Parameters
plan_code- string - required - identifier of plan you want to allocatecustom_interval_days- integer - optional - custom duration indays(for time-based plans only)refilling_time- string - optional - custom refilling time in 24-hours format (for bandwidth-based plans only, must be used together withrefilling_time_offset)refilling_time_offset- string - optional - custom refilling time offset (for bandwidth-based plans only, must be used together withrefilling_time)
Returns
When the request is successful, it will return api_status and the plan info as PlanInfoItem object.
In the event the request fails, the response will contain an error field that can be used to determine the error.
Revoke allocated purchase
Example Request
$ curl https://api.wlvpn.com/v2/customers/12749163/revoke/ \
-H 'Content-Type: application/json' \
-u 'api-key:<api-key>' \
-d '{
"plan_code": "coolvpn_one_month_unlimited"
}'
Example response
{
"api_status": 1
}
Revokes earlier allocated service
Request Parameters
plan_code- string - required - Identifier of the plan you want to revoke. It will revoke the last added plan with the given code. This parameter can't be used together with thepurchase_idparameter.purchase_id- integer - required - Identifier of the purchase you want to revoke. This parameter can't be used together with theplan_codeparameter.no_remaining_plan_handling- string - optional - This parameter defines the actions to be taken after the last available plan is revoked. It can be one of the following values:default- default value - The account will be closed with theCap reachedstatus after your defined grace period for subscriptions, or immediate closure for bandwidth only accountsclosed- the account should be immediately closed with theClosedstatuscap reached- the account should be immediately closed with theCap reachedstatusunlimited- the account should be immediately returned to unlimited use
Returns
When the request is successful, no parameters besides api_status are returned. In the event the
request fails, the response will contain an error field that can be used to determine the error.
Servers
The Servers API allows you to retrieve the list of servers that are enabled for your account. These servers are the only servers that your Accounts will work with.
The Server object
Example server object
{
"country": "FR",
"city": "Paris",
"ip": "80.24.24.52",
"capacity": "4"
}
| Attributes | |
|
country
string
|
Country location of the server |
|
city
string
|
City location of the server |
|
ip
string
|
IP Address of the server |
|
capacity
string
|
Current capacity of the server. This value will be between |
List all servers
Example request
$ curl 'https://api.wlvpn.com/v2/servers' \
-u 'api-key:<api-key>'
| Attributes | |
|
country
string
|
Comma-separated values of ISO 3166 country code that filters servers based on region |
Example response
{
"api_status": 1,
"server": {
"par-a01.wlvpn.com": {
"country": "FR",
"city": "Paris",
"capacity": 5,
"ip": "0.0.0.0"
},
"atl-a01.wlvpn.com": {
"country": "US",
"city": "Atlanta",
"capacity": 35,
"ip": "0.0.0.0"
}
...,
...
}
}
Retrieves a list of servers that your Reseller accounts will have access to.
Returns
On a successful request, the server field will contain a map of servers. The key in the map will
be the FQDN of the server.
Metrics
The Metrics API allows you to retrieve statistics around the platforms usage and customer behavior for your Reseller account. With this API, you can retrieve the available metrics for your account and generate statistical reports based on these metrics.
Retrieving usage metrics
Example request
$ curl -X GET https://api.wlvpn.com/v2/metrics/usage/pop_and_country/?start_date=2023-10-01&end_date=2023-10-31
-u 'api-key:<api-key>'
Example response
{
"data": {
"acc": {
"TR": {
"bandwidth": 19996,
"connections": 1,
"customers": 1
}
},
"lax": {
"AU": {
"bandwidth": 223,
"connections": 1,
"customers": 1
},
"US": {
"bandwidth": 212304205666,
"connections": 2,
"customers": 2
}
}
}
}
This API endpoint retrieves total usage information for a specified time period. It returns three metrics grouped by pop and country_code:
- Count of unique connections (field
connections) - Count of unique customers (field
customers) - Total bandwidth consumed in bytes (field
bandwidth)
Request Parameters
Required query parameters:
start_date— Date in theYYYY-MM-DDformat — Start date (UTC, begins at 00:00:00)end_date— Date in theYYYY-MM-DDformat — End date (UTC, ends at 23:59:59)
The date range is fully inclusive. Example: ?start_date=2023-10-01&end_date=2023-10-31 covers the entire month of October. The start and end dates must be within the same month.