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

Request

This function adds a transfer session to a queue. For more information about how this function works with other functions in the transfer and restore process, read our Guide to Transfer and Restore API Functions documentation.

Important:

The module parameter determines which additional parameters to use with the function.

Security
BasicAuth
Bodyapplication/x-www-form-urlencoded

An enqueue transfer item.

modulestringrequired

The transfer system module.

  • LegacyAccountBackup — This module restores legacy-account backup files.
  • FeatureListRemoteRoot — This module transfers the feature list from the remote server.
  • PackageRemoteRoot — This module transfers the package settings.
  • AccountLocal — This module restores backup files.
  • AccountRemoteRoot — This module uses the root credentials to transfer account settings that are not a part of a package.
  • AccountRemoteUser — This module uses the account's user credentials to transfer account settings that are not a part of a package.

Note:

  • The module parameter determines which additional parameters to use with the function.
  • You must perform each module action as a separate step.

When you call this function, you must include the additional parameters for the desired transfer system module. Select a module from the menu to view its required additional parameters:

Example: "AccountRemoteRoot"
Discriminator
sizeinteger>= 1

The size of the content to transfer, in bytes. The restore system uses this value to determine the best filesystem partition for the restored account’s home directory. For best results, give as accurate of a value as possible.

Default 1
Example: 133698
transfer_session_idstringrequired

The transfer session's ID.

Example: "vm5docscpanelcopya20140211211719FxjU"
customipstring

The custom IP address to assign to the transferred account.

Note:

This parameter requires that the ip parameter has a value of 1.

Example: "192.168.0.1"
detected_remote_userstring

The user account name that the remote server returns when you query the user account.

Example: "user"
domainstring(domain)

The domain name.

Example: "example.com"
ipinteger

Whether to assign a dedicated IP address to the transferred account.

  • 1 — Assign a dedicated IP address.
  • 0 — Do not assign a dedicated IP address.

Note:

If no dedicated IP address exists, the system assigns the account to a shared IP address.

Enum01
Example: 1
localuserstring(username)required

The local account's username.

Example: "localuser"
mail_locationstring

The server on which the account's email will reside after it completes the transfer.

  • .local — The local server.
  • .existing — Use the location defined in the account's backup data.
  • The alias (friendly name) of a remote cPanel & WHM linked server node.. For example, the example-alias for the servernode.example.com domain.

Note:

The system will use the .local option if:

  • The system cannot use the cPanel & WHM linked server node when you call the .existing option.
  • The cPanel & WHM linked server node's alias (friendly name) is invalid.
Default ".existing"
Example: ".local"
One of:

The server on which the account's email will reside after it completes the transfer.

  • .local — The local server.
  • .existing — Use the location defined in the account's backup data.
  • The alias (friendly name) of a remote cPanel & WHM linked server node.. For example, the example-alias for the servernode.example.com domain.

Note:

The system will use the .local option if:

  • The system cannot use the cPanel & WHM linked server node when you call the .existing option.
  • The cPanel & WHM linked server node's alias (friendly name) is invalid.
string

The server on which the account's email will reside after it completes the transfer.

  • .local — The local server.
  • .existing — Use the location defined in the account's backup data.
  • The alias (friendly name) of a remote cPanel & WHM linked server node.. For example, the example-alias for the servernode.example.com domain.

Note:

The system will use the .local option if:

  • The system cannot use the cPanel & WHM linked server node when you call the .existing option.
  • The cPanel & WHM linked server node's alias (friendly name) is invalid.
Default ".existing"
Enum".local"".existing"
overwrite_sameowner_dbsinteger

Whether to allow the system to overwrite the account's existing databases with the databases in the backup file.

  • 1 — Overwrite.
  • 0 — Do not overwrite.
Enum01
Example: 1
overwrite_sameowner_dbusersinteger

Whether to allow the system to overwrite the account's existing database users with the database users in the backup file.

  • 1 — Overwrite.
  • 0 — Do not overwrite.
Enum01
Example: 1
overwrite_with_deleteinteger

Whether to replace and delete all directories and files on the destination server.

  • 1 — Overwrite.
  • 0 — Do not overwrite.

Warning:

If you use this parameter, the system deletes every directory and file on the destination server. The system does not delete the directories and files from the source server.

Enum01
Example: 1
replaceipstring

The lines in the domain's zonefile to replace with the new IP address.

  • all — Replace all of the matching A record addresses in the zone file with the new IP address, including custom A records.
  • basic — Replace only the cPanel-managed A records for this IP address. This includes the main domain and any service subdomains.
Enum"all""basic"
Example: "all"
resellerinteger

Whether to make the account a reseller.

  • 1 — Make the account a reseller account.
  • 0 — Do not make the account a reseller account.
Enum01
Example: 1
shared_mysql_serverinteger

Whether one of the following conditions is true:

  • The target and remote servers share the same remote MySQL server.
  • The target server is the remote MySQL server for the remote server.
  • The remote server is the remote MySQL server for the target server.

Value:

  • 1 — One is true.
  • 0 — None are true.
Enum01
Example: 1
skipaccountinteger

Whether to skip the recreation of the account.

  • 1 — Skip.
  • 0 — Restore.

Note:

  • The values you enter for the user and localuser parameters must match.
  • This parameter is similar to the force parameter, but performs none of the account creation steps.
Enum01
Example: 1
skipacctdbinteger

Whether to skip the transfer of the account's databases.

  • 1 — Skip.
  • 0 — Restore.
Enum01
Example: 1
skipbwdatainteger

Whether to skip the transfer of the account's bandwidth data.

  • 1 — Skip.
  • 0 — Restore.
Enum01
Example: 1
skiphomedirinteger

Whether to skip the contents of the home directory.

  • 1 — Skip.
  • 0 — Restore.
Enum01
Example: 1
skipresinteger

Whether to skip restoration of the account's reseller permissions.

  • 1 — Skip.
  • 0 — Restore.
Enum01
Example: 1
userstring(username)required

The account to transfer.

Example: "user"
forceinteger

Whether to overwrite an account with an identical username.

  • 1 — Overwrite the account.
  • 0 — Do not overwrite the account.

This parameter performs the following actions:

  • Restores the cPanel account on the destination server.
  • Overwrites all account settings, data, and databases.
  • Ignores errors and warnings for naming conflicts.

Note:

  • The values you enter for the user and localuser parameters must match.
  • You cannot use this parameter if you called the WHM API 1 create_remote_root_transfer_session function with the unrestricted_restore parameter set to 1.
Enum01
Example: 1
curl -i -X GET \
  -u <username>:<password> \
  https://api.docs.cpanel.net/_mock/specifications/whm.openapi/enqueue_transfer_item \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d module=AccountLocal \
  -d size=133698 \
  -d transfer_session_id=vm5docscpanelcopya20140211211719FxjU \
  -d customip=192.168.0.1 \
  -d detected_remote_user=user \
  -d domain=example.com \
  -d ip=1 \
  -d localuser=localuser \
  -d mail_location=.local \
  -d overwrite_sameowner_dbs=1 \
  -d overwrite_sameowner_dbusers=1 \
  -d overwrite_with_delete=1 \
  -d replaceip=all \
  -d reseller=1 \
  -d shared_mysql_server=1 \
  -d skipaccount=1 \
  -d skipacctdb=1 \
  -d skipbwdata=1 \
  -d skiphomedir=1 \
  -d skipres=1 \
  -d user=user \
  -d force=1

Responses

HTTP Request was successful.

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

Request

This function pauses an active transfer session.

Note:

For more information about how this function works with other functions in the transfer and restore process, read our Guide to Transfer and Restore API Functions documentation.

Security
BasicAuth
Query
transfer_session_idstringrequired

The transfer session's ID.

Example: transfer_session_id=exampleservercopya20140206192428NtyW
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/pause_transfer_session?transfer_session_id=exampleservercopya20140206192428NtyW'

Responses

HTTP Request was successful.

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

Request

This function starts or restarts a transfer session.

Note:

For more information about how this function works with other functions in the transfer and restore process, read our Guide to Transfer and Restore API Functions documentation.

Security
BasicAuth
Query
transfer_session_idstringrequired

The transfer session's ID.

Example: transfer_session_id=exampleservercopya20140206192428NtyW
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/start_transfer_session?transfer_session_id=exampleservercopya20140206192428NtyW'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "pid": 90210 }, "metadata": { "command": "start_transfer_session", "reason": "OK", "result": 1, "version": 1 } }

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

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