PLESK - PLANS - LIST PLANS

Plesk - Plans - List Plans API Endpoints

Complete documentation for all Plesk - Plans - List Plans related endpoints.

GET

List Plesk Plans

Retrieve all available Web Hosting plans with pricing and features.

Endpoint Details

HTTP Request
GET https://0xhost.com/API/plesk/plans/lists_plans
Authentication
API Key Required in header
Headers
Header Value Required Description
x-api-key your_api_key_here Yes Your unique API key for authentication
Content-Type application/json Optional Recommended for consistent response handling

Response Fields

Field Type Description
success boolean Indicates if the operation was successful
message string Response message describing the result
data object/array Contains the response data

Success Response

API Response Example
{
    "success": true,
    "data": [
        {
            "id": "basic",
            "db_id": "plan123-4567-8901-2345-678901234567",
            "plesk_plan_id": 1,
            "name": "Basic",
            "price": 9.99,
            "currency": "EUR",
            "features": {
                "domains": 5,
                "disk_space": "10 GB",
                "bandwidth": "100 GB",
                "mailboxes": 10,
                "databases": 5,
                "ssl": true
            }
        },
        {
            "id": "medium",
            "db_id": "plan234-5678-9012-3456-789012345678",
            "plesk_plan_id": 2,
            "name": "Medium",
            "price": 19.99,
            "currency": "EUR",
            "features": {
                "domains": 25,
                "disk_space": "50 GB",
                "bandwidth": "500 GB",
                "mailboxes": 50,
                "databases": 25,
                "ssl": true
            }
        }
    ],
    "count": 2,
    "generated_at": "2025-03-20 10:30:00"
}

Code Examples

Programming Languages
JavaScript (Fetch API)
async function makeRequest() {
  try {
    const response = await fetch('https://0xhost.com/API/plesk/plans/lists_plans', {
      method: 'GET',
      headers: {
        'x-api-key': 'your_api_key_here',
        'Content-Type': 'application/json'
      }
    });

    const data = await response.json();
    console.log('Response:', data);
    return data;
  } catch (error) {
    console.error('Error:', error);
  }
}
Python (Requests)
import requests

def make_request(api_key):
    url = 'https://0xhost.com/API/plesk/plans/lists_plans'
    headers = {
        'x-api-key': api_key,
        'Content-Type': 'application/json'
    }

    response = requests.get(url, headers=headers)

    if response.status_code == 200:
        return response.json()
    else:
        print(f'Error: {response.status_code}')
        return None
PHP (cURL)
function makeRequest($apiKey) {
    $url = 'https://0xhost.com/API/plesk/plans/lists_plans';

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        'x-api-key: ' . $apiKey,
        'Content-Type: application/json'
    ]);

    $response = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);

    return json_decode($response, true);
}
cURL Command
curl -X GET \
  'https://0xhost.com/API/plesk/plans/lists_plans' \
  -H 'x-api-key: your_api_key_here' \
  -H 'Content-Type: application/json'