PHP

Updated Oct 4, 2026 Markdown

DELETE /api/v1/accounts/{username}/domains/{domain}/php/config

Reset domain PHP overrides to account defaults

Removes the domain-scope overrides — the domain reverts to account-level PHP settings.

Path parameters:

Name Type Required Notes
username string yes —
domain string yes —

Responses:

Status Schema Description
200 ApiSuccess_DomainPHPConfigResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "display_errors": false,
    "document_root": "string",
    "domain": "example.com",
    "domain_type": "example.com",
    "is_custom": false,
    "max_execution_time": 300,
    "max_input_time": 300,
    "max_input_vars": 1000,
    "memory_limit": "256M",
    "post_max_size": "64M",
    "upload_max_filesize": "64M"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X DELETE \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/domains/{domain}/php/config

GET /api/v1/accounts/{username}/domains/{domain}/php/config

Get domain-scope PHP ini overrides

Returns the php.ini overrides applied to this single domain.

Path parameters:

Name Type Required Notes
username string yes —
domain string yes —

Responses:

Status Schema Description
200 ApiSuccess_DomainPHPConfigResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "display_errors": false,
    "document_root": "string",
    "domain": "example.com",
    "domain_type": "example.com",
    "is_custom": false,
    "max_execution_time": 300,
    "max_input_time": 300,
    "max_input_vars": 1000,
    "memory_limit": "256M",
    "post_max_size": "64M",
    "upload_max_filesize": "64M"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/domains/{domain}/php/config

PUT /api/v1/accounts/{username}/domains/{domain}/php/config

Update domain-scope PHP ini overrides

Patch the per-domain php.ini overrides — only present fields are touched.

Path parameters:

Name Type Required Notes
username string yes —
domain string yes —

Body fields:

Field Type Required Notes
display_errors boolean no —
max_execution_time integer no —
max_input_time integer no —
max_input_vars integer no —
memory_limit string no —
post_max_size string no —
upload_max_filesize string no —

Request body example:

JSON
{
  "display_errors": false,
  "max_execution_time": 0,
  "max_input_time": -1.0,
  "max_input_vars": 1.0,
  "memory_limit": "string",
  "post_max_size": "string",
  "upload_max_filesize": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_DomainPHPConfigResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "display_errors": false,
    "document_root": "string",
    "domain": "example.com",
    "domain_type": "example.com",
    "is_custom": false,
    "max_execution_time": 300,
    "max_input_time": 300,
    "max_input_vars": 1000,
    "memory_limit": "256M",
    "post_max_size": "64M",
    "upload_max_filesize": "64M"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/domains/{domain}/php/config

PUT /api/v1/accounts/{username}/domains/{domain}/php/version

Change PHP version for a single domain

Override the account-level PHP version for one specific domain.

Path parameters:

Name Type Required Notes
username string yes —
domain string yes —

Body fields:

Field Type Required Notes
version string yes pattern=^\d+\.\d+$

Request body example:

JSON
{
  "version": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_PHPDomainVersionData_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "domain": "example.com",
    "version": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/domains/{domain}/php/version

GET /api/v1/accounts/{username}/php

Get active PHP version

Returns the account's currently configured PHP-FPM version.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_PHPVersionData_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "version": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/php

GET /api/v1/accounts/{username}/php/config

Get account PHP ini values

Returns the effective php.ini overrides for this account.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/php/config

PUT /api/v1/accounts/{username}/php/config

Update account PHP ini values

Patch the account's php.ini overrides — only fields present in the body are mutated.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
display_errors boolean no —
error_reporting string no —
max_execution_time integer no —
max_input_time integer no —
max_input_vars integer no —
memory_limit string no —
post_max_size string no —
upload_max_filesize string no —

Request body example:

JSON
{
  "display_errors": false,
  "error_reporting": "string",
  "max_execution_time": 0,
  "max_input_time": -1.0,
  "max_input_vars": 1.0,
  "memory_limit": "string",
  "post_max_size": "string",
  "upload_max_filesize": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/php/config

GET /api/v1/accounts/{username}/php/domains

List domain-level PHP overrides for an account

Returns every domain owned by the account with its effective PHP version and override status.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_AccountDomainsForPHP_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "domains": [
      "..."
    ],
    "username": "alice"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/php/domains

GET /api/v1/accounts/{username}/php/extensions

Get PHP extension status for the account

Lists every PHP extension on the host and whether it is enabled for this account.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_PHPExtensionsStatusResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "extensions": [
      "..."
    ],
    "php_version": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/php/extensions

PUT /api/v1/accounts/{username}/php/extensions

Toggle PHP extension for the account

Enable or disable a single PHP extension at the account scope.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
enabled boolean yes —
extension string yes pattern=^[a-z][a-z0-9_]{0,31}$

Request body example:

JSON
{
  "enabled": false,
  "extension": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_PHPExtensionsStatusResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "extensions": [
      "..."
    ],
    "php_version": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/php/extensions

GET /api/v1/accounts/{username}/php/ioncube

Get IonCube Loader status

Reports whether the IonCube Loader is enabled for this account.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_IonCubeStatusResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "enabled": false,
    "loader_installed": false,
    "php_version": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/php/ioncube

PUT /api/v1/accounts/{username}/php/ioncube

Toggle IonCube Loader

Enable or disable the IonCube Loader extension for this account's PHP.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
enabled boolean yes —

Request body example:

JSON
{
  "enabled": false
}

Responses:

Status Schema Description
200 ApiSuccess_IonCubeStatusResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "enabled": false,
    "loader_installed": false,
    "php_version": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/php/ioncube

GET /api/v1/accounts/{username}/php/max-processes

Get PHP-FPM pool max-processes

Returns the configured pm.max_children and the auto-derived default.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_MaxProcessesResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "auto_calculated": 0,
    "effective": 0,
    "is_overridden": false,
    "max_value": 500,
    "min_value": 1,
    "override": "...",
    "php_version": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/php/max-processes

PUT /api/v1/accounts/{username}/php/max-processes

Set PHP-FPM pool max-processes

Override pm.max_children for this account, or pass null to revert to auto-calculated default.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
max_children integer no —

Request body example:

JSON
{
  "max_children": 1.0
}

Responses:

Status Schema Description
200 ApiSuccess_MaxProcessesResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "auto_calculated": 0,
    "effective": 0,
    "is_overridden": false,
    "max_value": 500,
    "min_value": 1,
    "override": "...",
    "php_version": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/php/max-processes

GET /api/v1/accounts/{username}/php/opcache

Get OPcache status for the account's PHP version

Returns memory usage, hit/miss counters, cached file count and runtime config flags.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_OPcacheStatusResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "cached_files": 0,
    "enabled": false,
    "hit_rate": 0,
    "hits": 0,
    "max_cached_files": 0,
    "memory_total_mb": 128,
    "memory_usage_mb": 0,
    "memory_used_percent": 0,
    "misses": 0,
    "php_version": "",
    "revalidate_freq": 2,
    "validate_timestamps": true
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/php/opcache

POST /api/v1/accounts/{username}/php/opcache/clear

Clear OPcache (account scope)

Restarts the PHP-FPM pool serving this account — invalidates every cached opcode.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 MessageResponse Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "message": "string",
  "status": "success"
}

cURL example:

shell
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/php/opcache/clear

PUT /api/v1/accounts/{username}/php/opcache/config

Update OPcache config

Patch OPcache runtime config (memory, file cap, revalidate frequency, etc.) for the account's PHP version.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
max_accelerated_files integer no —
memory_consumption integer no —
revalidate_freq integer no —
save_comments boolean no —
validate_timestamps boolean no —

Request body example:

JSON
{
  "max_accelerated_files": 200.0,
  "memory_consumption": 16.0,
  "revalidate_freq": 0,
  "save_comments": false,
  "validate_timestamps": false
}

Responses:

Status Schema Description
200 ApiSuccess_OPcacheStatusResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "cached_files": 0,
    "enabled": false,
    "hit_rate": 0,
    "hits": 0,
    "max_cached_files": 0,
    "memory_total_mb": 128,
    "memory_usage_mb": 0,
    "memory_used_percent": 0,
    "misses": 0,
    "php_version": "",
    "revalidate_freq": 2,
    "validate_timestamps": true
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/php/opcache/config

PUT /api/v1/accounts/{username}/php/version

Change account PHP version

Swap the account's PHP-FPM version. Pool conf is regenerated and reloaded.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
version string yes pattern=^\d+\.\d+$

Request body example:

JSON
{
  "version": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_PHPVersionData_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "version": "string"
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/php/version

GET /api/v1/system/php/defaults

Get system PHP default values

Returns the global php.ini defaults that new accounts inherit.

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/system/php/defaults

PUT /api/v1/system/php/defaults

Update system PHP defaults

Patch the global PHP defaults applied to new accounts (does not retro-apply).

Body fields:

Field Type Required Notes
default_display_errors boolean no —
default_max_execution_time integer no —
default_max_input_time integer no —
default_max_input_vars integer no —
default_memory_limit string no —
default_post_max_size string no —
default_upload_max_filesize string no —
default_version string no —

Request body example:

JSON
{
  "default_display_errors": false,
  "default_max_execution_time": 0,
  "default_max_input_time": -1.0,
  "default_max_input_vars": 1.0,
  "default_memory_limit": "string",
  "default_post_max_size": "string",
  "default_upload_max_filesize": "string",
  "default_version": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/system/php/defaults

GET /api/v1/system/php/extensions

Get system-wide PHP extensions status

Lists every installed PHP extension and its system-wide enable/disable state.

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/system/php/extensions

PUT /api/v1/system/php/extensions

Toggle system-wide PHP extension

Enable or disable an extension at the system scope — affects every PHP version.

Body fields:

Field Type Required Notes
enabled boolean yes —
extension string yes pattern=^[a-z][a-z0-9_]{0,31}$

Request body example:

JSON
{
  "enabled": false,
  "extension": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/system/php/extensions

GET /api/v1/system/php/opcache

OPcache status for every installed PHP version

Returns a card per installed PHP version; disabled versions are included with enabled=false.

Responses:

Status Schema Description
200 ApiSuccess_list_OPcacheStatusResponse__ Successful Response

Response example (200):

JSON
{
  "data": [
    {
      "cached_files": "...",
      "enabled": "...",
      "hit_rate": "...",
      "hits": "...",
      "max_cached_files": "...",
      "memory_total_mb": "...",
      "memory_usage_mb": "...",
      "memory_used_percent": "...",
      "misses": "...",
      "php_version": "...",
      "revalidate_freq": "...",
      "validate_timestamps": "..."
    }
  ],
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/system/php/opcache

POST /api/v1/system/php/opcache/{version}/clear

Clear OPcache (system scope)

Restarts PHP-FPM for the given version — invalidates every account's opcode cache on that version.

Path parameters:

Name Type Required Notes
version string yes —

Responses:

Status Schema Description
200 MessageResponse Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "message": "string",
  "status": "success"
}

cURL example:

shell
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/system/php/opcache/{version}/clear

GET /api/v1/system/php/overview

PHP domain overview

Per-domain PHP version map + version distribution across all domains. Response data: {domains: [...], total, version_distribution}.

Responses:

Status Schema Description
200 ApiSuccess_dict_str__Any__ Successful Response

Response example (200):

JSON
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/system/php/overview

GET /api/v1/system/php/versions

List installed PHP versions

Server-wide list of installed PHP-FPM versions + system default + enable/disable status per version.

Responses:

Status Schema Description
200 ApiSuccess_PHPVersionListResponse_ Successful Response

Response example (200):

JSON
{
  "data": {
    "default": "string",
    "installed": [
      "..."
    ],
    "versions": [
      "..."
    ]
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/system/php/versions

PUT /api/v1/system/php/versions

Enable / disable an installed PHP version

Toggle whether a specific PHP version is available to accounts.

Body fields:

Field Type Required Notes
enabled boolean yes —
version string yes pattern=^\d+\.\d+$

Request body example:

JSON
{
  "enabled": false,
  "version": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_PHPVersionListResponse_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "default": "string",
    "installed": [
      "..."
    ],
    "versions": [
      "..."
    ]
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/system/php/versions
Still Need Help?

Our support team is here around the clock for anything you can't find above.