---
title: List Available PHP Versions
description: "Returns every PHP version available on the server's OS, with install status, default flag, opcache state, and patch info. Requires the read:servers scope."
url: "https://betterdocs.shahrear.msf.bd/index.php/docs/hell0-boys-docs/hell0-boys/servers/list-available-php-versions/"
updated: "2026-08-20"
category: hell0 boys / Servers
---

# List Available PHP Versions

GET`/servers/{uuid}/php-versions/available`

## Code Samples

```curl

                curl --request GET \
  --url 'https://app.xcloud.host/api/v1/servers/{uuid}/php-versions/available' \
  --header 'Authorization: Bearer YOUR_TOKEN'

                const response = await fetch('https://app.xcloud.host/api/v1/servers/{uuid}/php-versions/available', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
});

const data = await response.json();
console.log(data);

                import requests

headers = {
    "Authorization": "Bearer YOUR_TOKEN"
}

response = requests.get("https://app.xcloud.host/api/v1/servers/{uuid}/php-versions/available", headers=headers)

print(response.json())

                <?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://app.xcloud.host/api/v1/servers/{uuid}/php-versions/available',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
  'Authorization: Bearer YOUR_TOKEN'
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;

                using System.Net.Http;

var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://app.xcloud.host/api/v1/servers/{uuid}/php-versions/available");
request.Headers.Add("Authorization", "Bearer YOUR_TOKEN");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);

                import java.net.URI;
import java.net.http.*;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://app.xcloud.host/api/v1/servers/{uuid}/php-versions/available"))
    .header("Authorization", "Bearer YOUR_TOKEN")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Response

```json

                {
    "success": true,
    "message": "Operation completed successfully.",
    "data": [
        {
            "version": "8.3",
            "status": "installed",
            "opcache_enabled": true,
            "is_default": true,
            "current_version": "8.3.7",
            "patch_available": "8.3.9",
            "installing": true
        }
    ]
}

                {
    "success": false,
    "message": "Unauthenticated.",
    "data": null
}

                {
    "success": false,
    "message": "This action is unauthorized. Your token is missing the required scope.",
    "data": null
}

                {
    "success": false,
    "message": "Not found.",
    "data": null
}
```

Returns every PHP version available on the [Server](https://betterdocs.shahrear.msf.bd/encyclopedia/server/)'s OS, with install status, default flag, opcache state, and patch info. Requires the `read:servers` scope.

## Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `uuid` | string (uuid) | **Required** | UUID of the [Server](https://betterdocs.shahrear.msf.bd/encyclopedia/server/) |

## Responses

### 200 — Available PHP versions with install state

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |
| `data` | array of object | Optional |  |

```json

                {
    "success": true,
    "message": "Operation completed successfully.",
    "data": [
        {
            "version": "8.3",
            "status": "installed",
            "opcache_enabled": true,
            "is_default": true,
            "current_version": "8.3.7",
            "patch_available": "8.3.9",
            "installing": true
        }
    ]
}
```

### 401 — Missing or invalid authentication token

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |

```json

                {
    "success": false,
    "message": "Unauthenticated.",
    "data": null
}
```

### 403 — Token lacks the required scope

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |

```json

                {
    "success": false,
    "message": "This action is unauthorized. Your token is missing the required scope.",
    "data": null
}
```

### 404 — Resource not found or not accessible to your [Team](https://betterdocs.shahrear.msf.bd/encyclopedia/team/)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |

```json

                {
    "success": false,
    "message": "Not found.",
    "data": null
}
```
