Complete API documentation for managing VPS services. Create, manage, and monitor VPS instances.
All API requests must include the following headers for authentication:
Your API key is provided when you become a reseller. Include it in every request:
X-API-KEY: your_key_hereTest the API endpoints with your credentials. Enter your API key and try the requests.
Retrieve the list of all VPS products available for reselling.
https://api.xeniahosting.com/reseller-api/vps/products/reseller-api/vps/productsRetrieve the list of all VPS products available for reselling.
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | Optional | Page number (optional) |
limit | integer | Optional | Number of results per page (optional) |
curl -X GET "https://api.xeniahosting.com/reseller-api/vps/products" \
-H "X-API-KEY: your_key_here" \
{
"success": true,
"data": [
{
"id": 1,
"name": "VPS Basic",
"price": 9.99,
"category": "vps"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 50
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}/reseller-api/vps/serversRetrieve the list of all VPS servers/instances.
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | Optional | Page number (optional) |
limit | integer | Optional | Number of results per page (optional) |
curl -X GET "https://api.xeniahosting.com/reseller-api/vps/servers" \
-H "X-API-KEY: your_key_here" \
{
"success": true,
"data": [
{
"id": 1,
"name": "VPS-001",
"status": "active",
"ip": "192.168.1.100",
"created_at": "2024-01-01T00:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 50
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}/reseller-api/vps/serversCreate a new VPS server instance.
| Name | Type | Required | Description |
|---|---|---|---|
product_id | integer | Required | ID of the VPS product |
hostname | string | Required | Hostname for the VPS |
curl -X POST "https://api.xeniahosting.com/reseller-api/vps/servers" \
-H "Content-Type: application/json" \
-H "X-API-KEY: your_key_here" \
-d '{
"product_id": 1,
"hostname": "vps.example.com"
}'{
"success": true,
"data": {
"id": 12345,
"name": "VPS-001",
"status": "pending",
"created_at": "2024-01-01T00:00:00Z"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid product_id"
}
}/reseller-api/vps/servers/{id}Retrieve details of a specific VPS server.
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Server ID |
curl -X GET "https://api.xeniahosting.com/reseller-api/vps/servers/12345" \
-H "X-API-KEY: your_key_here" \
{
"success": true,
"data": {
"id": 12345,
"name": "VPS-001",
"status": "active",
"ip": "192.168.1.100",
"created_at": "2024-01-01T00:00:00Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Server not found"
}
}/reseller-api/vps/servers/{id}Update a VPS server configuration.
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Server ID |
hostname | string | Optional | New hostname |
curl -X PUT "https://api.xeniahosting.com/reseller-api/vps/servers/12345" \
-H "Content-Type: application/json" \
-H "X-API-KEY: your_key_here" \
-d '{
"hostname": "new-hostname.example.com"
}'{
"success": true,
"data": {
"id": 12345,
"hostname": "new-hostname.example.com",
"updated_at": "2024-01-01T00:00:00Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Server not found"
}
}/reseller-api/vps/servers/{id}Delete a VPS server instance.
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Server ID |
curl -X DELETE "https://api.xeniahosting.com/reseller-api/vps/servers/12345" \
-H "X-API-KEY: your_key_here" \
{
"success": true,
"message": "Server deleted successfully"
}{
"error": {
"code": "NOT_FOUND",
"message": "Server not found"
}
}/reseller-api/vps/servers/{id}/actionsPerform an action on a VPS server (start, stop, restart, reboot, etc.).
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Server ID |
action | string | Required | Action to perform (start, stop, restart, reboot) |
curl -X POST "https://api.xeniahosting.com/reseller-api/vps/servers/12345/actions" \
-H "Content-Type: application/json" \
-H "X-API-KEY: your_key_here" \
-d '{
"action": "restart"
}'{
"success": true,
"data": {
"action": "restart",
"status": "processing",
"message": "Server restart initiated"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid action"
}
}Code examples for integrating the VPS APIs in different programming languages:
curl -X GET "https://api.xeniahosting.com/reseller-api/vps/products" \
-H "X-API-KEY: your_key_here" \
APIs have rate limits to ensure stability and performance. The default limit is 100 requests per minute per API key.
All error responses follow this format:
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}Need help? Contact us through one of these channels:
XeniaHosting is a Hosting Provider, with locations in Italy and Netherlands.
We offer latest generation Hardware and Networks, with high level Anti-DDoS protections.
VAT: IT01849280191 - REA: CR-337979 - Social Capital €10.000
Company under management and coordination by XeniaGroup SRL