Skip to content
Download OpenAPI description
Overview
Languages
Servers
Mock server

https://api.docs.cpanel.net/_mock/specifications/whm.openapi/

A server running WHM.

https://{host}:{port}/json-api/

Restore Account

Account Restoration / Restore Account

Operations

Restore Queue Management

Account Restoration / Restore Queue Management

Operations

Restore Queue Reporting

Account Restoration / Restore Queue Reporting

Operations

Account Creation

Accounts Creation / Accounts

Operations

Account Enhancements

Accounts / Account Enhancements

Operations

Account Management

Accounts / Account Management

Operations

Bandwidth and Disk Quotas

Accounts / Bandwidth and Disk Quotas

Operations

Domain Information

Accounts / Domain Domain Information

Operations
Operations

Styles

The Styles and Themes module for WHM API 1.

Operations
Operations

API Execution

API Development Tools / API Execution

Operations

API Statistics

API Development Tools / API Statistics

Operations

API Token Management

API Development Tools / API Token Management

Operations

Applications

API Development Tools / Applications

Operations

Session

API Development Tools / Session

Operations

Authentication Providers

Authentication / Authentication Providers

Operations

External Authentication

Authentication / External Authentication

Operations

Login URL

Authentication / Login URL

Operations

SSH Keys and Connections

Authentication / SSH Keys and Connections

Operations

Two-Factor Authentication

Authentication / Two-Factor Authentication

Operations

Backup Destination

Backups / Backup Destination

Operations

Backup or Restore

Backups / Backup or Restore

Operations

Backup Settings

Backups / Backup Settings

Operations

Legacy Migration

Backups / Legacy Migration

Operations

Market Integration

Commerce Integration / Market Integration

Operations

Sitejet

The Sitejet module for WHM API.

Operations

Product Management

cPanel Market / Product Management

Operations

Provider Management

cPanel Market / Provider Management

Operations

Support Access

cPanel Support Tickets / Support Access

Operations

Ticket Management

cPanel Support Tickets / Ticket Management

Operations

Customizations

The Customizations module for WHM API 1.

Operations

Manage MySQL Server

Databases / Manage MySQL Server

Operations

MySQL Databases

Databases / MySQL Databases

Operations

PostgreSQL Databases

Databases / PostgreSQL Databases

Operations

Remote MySQL Databases

Databases / Remote MySQL Databases

Operations

DNS Cluster Settings

DNS / DNS Cluster Settings

Operations
Operations
Operations

Domain Management

DNS / Domain Management

Operations

Domain Management

DNS / Domain Management

Operations
Operations

Service Records

DNS / Service Records

Operations

Feature Access

Hosting Plans / Feature Access

Operations

Feature Lists

Hosting Plans / Feature Lists

Operations

Hosting Plan Extensions

Hosting Plans / Hosting Plan Extensions

Operations

Hosting Plans

Hosting Plans / Hosting Plans

Operations

InProductSurvey

In-product survey information.

Operations

API Authentication

Integrations / API Authentication

Operations

Scripts Hooks

Integrations / Scripts Hooks

Operations

IPv4 Address Settings

IP Address Management / IPv4 Address Settings

Operations

IPv6 Address Settings

IP Address Management / IPv6 Address Settings

Operations

Network Address Translation

IP Address Management / Network Address Translation

Operations

Management

Login Security (cPHulk) / Management

Operations

Reporting

Login Security (cPHulk) / Reporting

Operations

Settings

Login Security (cPHulk) / Settings

Operations

cPanel Account Mail Management

Mail / cPanel Account Mail Management

Operations

Mail DNS Settings

Mail / Mail DNS Settings

Operations

Mail Server Settings

Mail / Mail Server Settings

Operations

Spam Management

Mail / Spam Management

Operations

Spam Protection (Greylisting)

Mail / Spam Protection (Greylisting)

Operations

NGINX Manager

The NGINX Manager module for WHM API 1.

Operations

Account Enhancement Limit

Resellers / Account Enhancement Limit

Operations

Account Limits

Resellers / Account Limits

Operations

Account Permissions

Resellers / Account Permissions

Operations

Account Settings

Resellers / Account Settings

Operations

Reseller Account Management

Resellers / Account Management

Operations
Operations

Configuration Clusters

Server Administration / Configuration Clusters

Operations

Configurations

Server Administration / Configurations

Operations

Connected Applications

Server Administration / Connected Applications

Operations

Connections

Server Administration / Connections

Operations

cPanel Analytics

The cPanel Analytics module for WHM API 1.

Operations

License Management

The Server Administration module for WHM API 1.

Operations

Notifications

Server Administration / Notifications

Operations

Plugin-Based Features

The plugin-based features module for WHM API 1.

Operations

Security

The Security module for WHM API 1.

Operations

Server Nodes

Server Administration / Server Nodes

Operations

Server Profiles

Server Administration / Server Profiles

Operations

Services

Server Administration / Services

Operations

System Information

The Server Administration module for WHM API 1.

Operations

Updates

Server Administration / Updates

Operations

Auto-Generated Certificates

SSL Certificates / Auto-Generated Certificates

Operations

cPanel Account Settings

SSL Certificates / cPanel Account Settings

Operations

SSL Server Settings

SSL Certificates / SSL Server Settings

Operations

Install or Uninstall Package

System Package Management / Install or Uninstall Package

Operations

List Package Information

System Package Management / List Package Information

Operations

Package Manager Settings

System Package Management / Package Manager Settings

Operations

cPanel Account Transfer

Transfers / cPanel Account Transfer

Operations

Transfer Configuration

Transfers / Transfer Configuration

Operations

Transfer Monitoring

Transfers / Transfer Monitoring

Operations

UserData

Scoped userdata storage functions.

Operations

EasyApache Settings

Web Server Configuration / EasyApache Settings

Operations
Operations

PHP-FPM

Web Server Configuration / PHP-FPM

Operations

Return PHP-FPM directives and pool options

Request

This function retrieves the PHP INI directives and pool options for a system's or domain's PHP-FPM configuration.

Important:

When you disable the WebServer role, the system disables this function.

Warning:

We strongly recommend that you only activate Apache PHP-FPM if your server has at least 2 GB of RAM available, or at least 30 MB of RAM per domain. If you enable PHP-FPM on a server with less than the required RAM, your server may experience severe performance issues.

Security
BasicAuth
Bodyapplication/jsonrequired
domainstring

A blank value or domain name whose PHP-FPM configuration you wish to retrieve.

  • A valid domain that resides on the local server — Retrieves the domain's PHP-FPM configuration information.
  • A blank value — Retrieves the system's PHP-FPM information.
Default ""
Example: "example.com"
curl -i -X POST \
  -u <username>:<password> \
  https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_fpm_config_get \
  -H 'Content-Type: application/json' \
  -d '{
    "domain": "example.com"
  }'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "config": [] }, "metadata": { "command": "php_fpm_config_get", "reason": "OK", "result": 1, "version": 1 } }

Update PHP-FPM directives and pool options

Request

This function configures the PHP INI directives and pool options for a system's or domain's PHP-FPM configuration.

Important:

When you disable the Web Server role, the system disables this function.

Warning:

We strongly recommend that you only activate Apache PHP-FPM if your server has at least 2 GB of RAM available, or at least 30 MB of RAM per domain. If you enable PHP-FPM on a server with less than the required RAM, your server may experience severe performance issues.

Security
BasicAuth
Bodyapplication/jsonrequired
configArray of objectsrequired

An array of objects containing the PHP-FPM configuration values to validate or update.

Example: [{"base_flag_name":"error_reporting","trinary_admin_value":1,"value":"E_ALL & ~E_NOTICE"},{"base_flag_name":"pm_max_children","trinary_admin_value":0,"value":"10"}]
config[].​base_flag_namestringrequired

A PHP INI directive or PHP-FPM pool option name.

PHP INI directives

  • allow_url_fopen - The PHP configuration treats URLs as files.
  • disable_functions - Lists the functions that the system will disable.
  • doc_root - The PHP pages' document root.
  • error_log - The error log file.
  • error_reporting - The errors that the system reports on.
  • log_errors - Whether the system will log errors.
  • short_open_tag - Whether the system recognizes code between the tags as a PHP source.

Pool options

  • pm_max_children - The maximum number of process pools that the PHP-FPM Master Process will generate to handle requests.
  • pm_max_requests - The maximum number of requests that the process pools can receive.
  • pm_process_idle_timeout - The amount of time, in seconds, that a pool process will wait for a request.
config[].​trinary_admin_valueintegerrequired

Whether the PHP value is a PHP INI directive value (php_value), a PHP INI ADMIN value (php_admin_value), or a PHP-FPM pool option (pm_*).

  • 0 - A PHP-FPM-specific value (pool options).
  • 1 - A PHP INI ADMIN directive. A cPanel account user cannot override this directive.
  • 2 - A PHP INI directive. A cPanel account user can override this directive.
Enum012
Example: 0
config[].​valuestringrequired

An argument value for base_flag_name parameter.

domainstring

A blank value or domain name whose PHP-FPM configuration you wish to set.

Default ""
validate_onlyboolean

Whether the function request is for validation or to update the settings.

  • true - Only validate the configuration.
  • false - Validate and update the configuration.
Default false
curl -i -X POST \
  -u <username>:<password> \
  https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_fpm_config_set \
  -H 'Content-Type: application/json' \
  -d '{
    "config": [
      {
        "base_flag_name": "error_reporting",
        "trinary_admin_value": 1,
        "value": "E_ALL & ~E_NOTICE"
      },
      {
        "base_flag_name": "pm_max_children",
        "trinary_admin_value": 0,
        "value": "10"
      }
    ]
  }'

Responses

HTTP Request was successful.

Bodyapplication/json
metadataobject
Response
application/json
{ "metadata": { "command": "php_fpm_config_set", "reason": "OK", "result": 1, "version": 1 } }

Return PHP-FPM status on new accounts

Request

This function determines whether the system enables PHP-FPM for new domains and accounts.

Important:

When you disable the Web Server role, the system disables this function.

Warning:

We strongly recommend that you only activate Apache PHP-FPM if your server has at least 2 GB of RAM available, or at least 30 MB of RAM per domain. If you enable PHP-FPM on a server with less than the required RAM, your server may experience severe performance issues.

Security
BasicAuth
curl -i -X GET \
  -u <username>:<password> \
  https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_get_default_accounts_to_fpm

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "default_accounts_to_fpm": 0 }, "metadata": { "command": "php_get_default_accounts_to_fpm", "reason": "OK", "result": 1, "version": 1 } }

Rule Settings

Web Server Security (ModSecurity) / Rule Settings

Operations

Rule Vendor Settings

Web Server Security (ModSecurity) / Rule Vendor Settings

Operations

Server Settings

Web Server Security (ModSecurity) / Server Settings

Operations