VPS Reseller API

Complete API documentation for managing VPS services. Create, manage, and monitor VPS instances.

Authentication

All API requests must include the following headers for authentication:

API Key

Your API key is provided when you become a reseller. Include it in every request:

X-API-KEY: your_key_here

API Playground

Test the API endpoints with your credentials. Enter your API key and try the requests.

Retrieve the list of all VPS products available for reselling.

(integer)
(integer)

Request URL

GET https://api.xeniahosting.com/reseller-api/vps/products
https://api.xeniahosting.com/reseller-api/vps/products

API Endpoints

GET
/reseller-api/vps/products

Retrieve the list of all VPS products available for reselling.

Parameters

NameTypeRequiredDescription
pageintegerOptionalPage number (optional)
limitintegerOptionalNumber of results per page (optional)

Example Request

curl -X GET "https://api.xeniahosting.com/reseller-api/vps/products" \
  -H "X-API-KEY: your_key_here" \

Example Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "VPS Basic",
      "price": 9.99,
      "category": "vps"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 50
  }
}

Error Codes

400Bad request
401Unauthorized - Invalid API key
429Rate limit exceeded
500Internal server error
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API key"
  }
}
GET
/reseller-api/vps/servers

Retrieve the list of all VPS servers/instances.

Parameters

NameTypeRequiredDescription
pageintegerOptionalPage number (optional)
limitintegerOptionalNumber of results per page (optional)

Example Request

curl -X GET "https://api.xeniahosting.com/reseller-api/vps/servers" \
  -H "X-API-KEY: your_key_here" \

Example Response

{
  "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 Codes

401Unauthorized - Invalid API key
429Rate limit exceeded
500Internal server error
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API key"
  }
}
POST
/reseller-api/vps/servers

Create a new VPS server instance.

Parameters

NameTypeRequiredDescription
product_idintegerRequiredID of the VPS product
hostnamestringRequiredHostname for the VPS

Example Request

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"
  }'

Example Response

{
  "success": true,
  "data": {
    "id": 12345,
    "name": "VPS-001",
    "status": "pending",
    "created_at": "2024-01-01T00:00:00Z"
  }
}

Error Codes

400Bad request
401Unauthorized - Invalid API key
429Rate limit exceeded
500Internal server error
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid product_id"
  }
}
GET
/reseller-api/vps/servers/{id}

Retrieve details of a specific VPS server.

Parameters

NameTypeRequiredDescription
idintegerRequiredServer ID

Example Request

curl -X GET "https://api.xeniahosting.com/reseller-api/vps/servers/12345" \
  -H "X-API-KEY: your_key_here" \

Example Response

{
  "success": true,
  "data": {
    "id": 12345,
    "name": "VPS-001",
    "status": "active",
    "ip": "192.168.1.100",
    "created_at": "2024-01-01T00:00:00Z"
  }
}

Error Codes

401Unauthorized - Invalid API key
404Resource not found
429Rate limit exceeded
500Internal server error
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Server not found"
  }
}
PUT
/reseller-api/vps/servers/{id}

Update a VPS server configuration.

Parameters

NameTypeRequiredDescription
idintegerRequiredServer ID
hostnamestringOptionalNew hostname

Example Request

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"
  }'

Example Response

{
  "success": true,
  "data": {
    "id": 12345,
    "hostname": "new-hostname.example.com",
    "updated_at": "2024-01-01T00:00:00Z"
  }
}

Error Codes

400Bad request
401Unauthorized - Invalid API key
404Resource not found
429Rate limit exceeded
500Internal server error
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Server not found"
  }
}
DELETE
/reseller-api/vps/servers/{id}

Delete a VPS server instance.

Parameters

NameTypeRequiredDescription
idintegerRequiredServer ID

Example Request

curl -X DELETE "https://api.xeniahosting.com/reseller-api/vps/servers/12345" \
  -H "X-API-KEY: your_key_here" \

Example Response

{
  "success": true,
  "message": "Server deleted successfully"
}

Error Codes

401Unauthorized - Invalid API key
404Resource not found
429Rate limit exceeded
500Internal server error
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Server not found"
  }
}
POST
/reseller-api/vps/servers/{id}/actions

Perform an action on a VPS server (start, stop, restart, reboot, etc.).

Parameters

NameTypeRequiredDescription
idintegerRequiredServer ID
actionstringRequiredAction to perform (start, stop, restart, reboot)

Example Request

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"
  }'

Example Response

{
  "success": true,
  "data": {
    "action": "restart",
    "status": "processing",
    "message": "Server restart initiated"
  }
}

Error Codes

400Bad request
401Unauthorized - Invalid API key
404Resource not found
429Rate limit exceeded
500Internal server error
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid action"
  }
}

Code Examples

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" \

Rate Limiting

APIs have rate limits to ensure stability and performance. The default limit is 100 requests per minute per API key.

200Request successful
429Rate limit exceeded - wait before making more requests

Error Handling

All error responses follow this format:

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API key"
  }
}

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

© XeniaHosting 2022-2026 - All rights reserved.