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

Request

This function adds a backup destination.

Security
BasicAuth
Query
application_keystringrequired

The application key's name.

Note:

This parameter is only valid for the Backblaze backup type.

Example: application_key=A123b45CD678e9
application_key_idstringrequired

The application key ID that authenticates the Backblaze B2 account.

Note:

This parameter is only valid for the Backblaze backup type.

Example: application_key_id=12a345B678c9
authtypestringrequired

The authorization type.

  • password
  • key

Note:

This parameter is only valid for the following backup types:

  • SFTP
  • Rsync
Enum"password""key"
Example: authtype=password
aws_access_key_idstringrequired

The Amazon S3™ Access Key ID.

Note:

This parameter is only valid for the following backup types:

  • AmazonS3
  • S3Compatible
Example: aws_access_key_id=AKIAYLWMPOZZJCERC28Q
bucketstringrequired

The Amazon S3™ bucket.

Note:

This parameter is only valid for the following backup types:

  • AmazonS3
  • S3Compatible
Example: bucket=ChockFullOfNuts
bucket_idstringrequired

The bucket's ID string.

Note:

This parameter is only valid for the Backblaze backup type.

Example: bucket_id=a12b34cd5678e9f
bucket_namestringrequired

The bucket's name.

Note:

This parameter is only valid for the Backblaze backup type.

Example: bucket_name=ChockFullOfNuts
client_idstringrequired

The Google Drive client ID.

Note:

This parameter is only valid for the GoogleDrive backup type.

Example: client_id=aBcdeFgHIjK123
client_secretstringrequired

The Google Drive client secret.

Note:

This parameter is only valid for the GoogleDrive backup type.

Example: client_secret=aBcde123FgHIjK456
disabledintegerrequired

Whether to disable the backup destination.

  • 1 — Disable the backup destination.
  • 0 — Enable the backup destination.
Enum01
Example: disabled=0
hoststring(hostname)required

The remote server's hostname.

Note:

This parameter is only valid for the following backup types:

  • Custom
  • FTP
  • SFTP
  • Rsync
  • WebDAV
  • S3Compatible
Example: host=backups.example.com
namestringrequired

The backup destination's name.

Example: name=destination_name
passwordstringrequired

The remote server account's password or secret access key.

Note:

This parameter is only valid for the following backup types:

  • AmazonS3
  • Custom
  • FTP
  • SFTP
  • Rsync
  • WebDAV
  • S3Compatible
Example: password=123456luggage
scriptstringrequired

The absolute file path to the user-supplied transport solution script.

Note:

This parameter is only valid for the Custom backup type.

Example: script=/home/backups/beammeupscotty.pl
typestringrequired

The type of backup destination.

  • Custom
  • FTP
  • Local
  • SFTP
  • WebDAV
  • AmazonS3
  • Rsync
  • GoogleDrive
  • S3Compatible
  • Backblaze

Note:

This value determines which parameters you can use with the function.

Warning:

Use any of these encrypted connections to transfer system backup files:

  • Amazon S3™
  • Backblaze
  • GoogleDrive
  • Rsync
  • S3 Compatible
  • SFTP
  • WebDAV with SSL enabled
Enum"Custom""FTP""Local""SFTP""WebDAV""AmazonS3""Rsync""GoogleDrive""S3Compatible""Backblaze"
Example: type=Local
usernamestring(username)required

The remote server account's username.

Note:

This parameter is only valid for the following backup types:

  • Custom
  • FTP
  • SFTP
  • Rsync
  • WebDAV
Example: username=username
folderstring

The path to the backups directory on the remote server.

Note:

This parameter is only valid for the following backup types:

  • AmazonS3
  • GoogleDrive
  • S3Compatible
Default ""
Example: folder=subfolder
mountinteger

Whether the path is mounted.

  • 1 — The path is mounted.
  • 0 — The path is not mounted.

Note:

This parameter is only valid for the Local backup type.

Default 0
Enum01
Example: mount=1
no_mount_failinteger

Whether to fail the backup attempt if the mount fails.

  • 1 — Fail the backup attempt.
  • 0 — Do not fail the backup attempt.

Note:

This parameter is only valid for the Local backup type.

Default 0
Enum01
Example: no_mount_fail=1
only_used_for_logsinteger

Whether to use this transport only for logs.

  • 1 — This destination will be skipped for regular backups.
  • 0 — Both log and regular backups will be uploaded.

This setting defaults to 0. The only time log files get their own backup is via scripts/remote_log_transfer

Default 0
Enum01
Example: only_used_for_logs=1
passiveinteger

Whether to use passive FTP.

  • 1 — Use passive FTP.
  • 0 — Use active FTP.

Note:

This parameter is only valid for the FTP backup type.

Default 0
Enum01
Example: passive=1
passphrasestring

The private key file's passphrase, if the authtype parameter is the key value.

Note:

This parameter is only valid for the following backup types:

  • SFTP
  • Rsync
Default null
Example: passphrase=123456luggage
pathstring

The path to the backups directory on the remote server.

  • This parameter is required for the Local backup type.
  • If you do not use this parameter, the system will not set a value.

Note:

This parameter is only valid for the following backup types:

  • Backblaze
  • Custom
  • Local
  • FTP
  • SFTP
  • Rsync
  • WebDAV
Default null
Example: path=backups
portinteger[ 1 .. 65535 ]

The TCP port to use.

Note:

  • This parameter defaults to the standard port used by the queried backup type parameter.
  • This parameter is only valid for the following backup types:
    • FTP
    • SFTP
    • Rsync
    • WebDAV
Example: port=21
privatekeystring

The file path to the private key file, if the authtype parameter is the key value.

Note:

This parameter is only valid for the following backup types:

  • SFTP
  • Rsync
Default null
Example: privatekey=/home/backups/key
sslinteger

Whether to use SSL.

  • 1 — Use SSL.
  • 0 — Do not use SSL.

Note:

This parameter is only valid for the WebDAV backup type.

Default 0
Enum01
Example: ssl=1
timeoutinteger

The session timeout, measured in seconds.

Note:

  • This parameter is not valid for the Local backup type parameter.
  • The default value depends on the type parameter's value.
Example: timeout=30
upload_system_backupinteger

Whether to upload system backups.

  • 1 — Upload system backups.
  • 0 — Do not upload system backups.
Default 0
Enum01
Example: upload_system_backup=1
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_destination_add?application_key=A123b45CD678e9&application_key_id=12a345B678c9&authtype=password&aws_access_key_id=AKIAYLWMPOZZJCERC28Q&bucket=ChockFullOfNuts&bucket_id=a12b34cd5678e9f&bucket_name=ChockFullOfNuts&client_id=aBcdeFgHIjK123&client_secret=aBcde123FgHIjK456&disabled=0&host=backups.example.com&name=destination_name&password=123456luggage&script=%2Fhome%2Fbackups%2Fbeammeupscotty.pl&type=Local&username=username&folder=subfolder&mount=1&no_mount_fail=1&only_used_for_logs=1&passive=1&passphrase=123456luggage&path=backups&port=21&privatekey=%2Fhome%2Fbackups%2Fkey&ssl=1&timeout=30&upload_system_backup=1'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "id": "PhAxIoLSdIkCI40q9vWS4BYy" }, "metadata": { "command": "backup_destination_add", "reason": "OK", "result": 1, "version": 1 } }

Request

This function removes a backup destination from the backup configuration file.

Security
BasicAuth
Query
idstringrequired

The destination's ID.

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

Responses

HTTP Request was successful.

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

Return a backup destination's settings

Request

Use this function to obtain a backup destination's settings.

Security
BasicAuth
Query
idstringrequired

The backup destination's ID.

Example: id=0W1ei2rd3A4lI5sT6he7Be8st
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_destination_get?id=0W1ei2rd3A4lI5sT6he7Be8st'

Responses

HTTP Request was successful.

Bodyapplication/json
dataany(BackupDestinationGetResponse)
metadataobject
Response
application/json
{ "data": { "aws_access_key_id": "access-key-id", "bucket": "s3-bucket-brigade", "disabled": 0, "folder": "", "id": "Sr1ThYOnnBIXUupTcSBYQywk", "name": "Amazon S3", "timeout": 30, "type": "AmazonS3", "upload_system_backup": 0 }, "metadata": { "command": "backup_destination_get", "reason": "OK", "result": 1, "version": 1 } }

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

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