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

Migrate OpenSSH key to PuTTY format

Request

This function converts an OpenSSH private key to a PuTTY key.

Warning:

Do not transfer private keys over insecure ports.

Security
BasicAuth
Query
filestringrequired

The private key file's name.

Example: file=KeyFile
keep_fileinteger

Whether to keep the OpenSSH file on the server after conversion.

  • 1 — Keep the file.
  • 0 — Delete the file.
Default 1
Enum01
Example: keep_file=0
passphrasestring

The private key file's passphrase.

Default ""
Example: passphrase=12345luggage
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/convertopensshtoputty?file=KeyFile&keep_file=0&passphrase=12345luggage'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "key": "PuTTY-User-Key-File-2: ssh-rsa Encryption: aes256-cbc Comment: imported-openssh-key Public-Lines: 12 AAAAB3NzaC1yc2EAAAABIwAAAgEAuuth41YYyWABsRKexJXgSMD8FvIBFCptUfZP 4U/6R41FvL/R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ZrfLJaaQ0iAiUyMep/keLP2bJ4Y97o+03BtQszZ zixXvzeQAX97WdBaUJU0C3mCKDOtkv4RWZ8hXV5v0m2tm7xbXVBzF22Pej2iHDKx GQkciskBRwQM4bDZorkcO+WnGn6uPbtw5v/AuIUqB1UNAcehWN6UTiFNveP4hLYu iRGWnZZ+uTbip91PNXSxXzb9yMWV2qSVIsZvud8kpR8ttL26Z4ySUKkFuPrgUeTeELnOF3GP6Ixk+IkwxU575w== Private-MAC: 1dfa6a4c8297d31e4cfadbf61aac8b4c5ca75584" }, "metadata": { "command": "convertopensshtoputty", "reason": "OK", "result": 1, "version": 1 } }

Request

This function function deletes an SSH key from the server.

Warning:

Only the root account can use this function, and it only affects the root keys. To perform this function on a cPanel user account, call the cPanel API 2 SSH::authkey function through the WHM API.

Security
BasicAuth
Query
filestringrequired

The SSH key file's name.

Example: file=/root/.ssh/test
leave_authorizedinteger

Whether to authorize the SSH key to access the server.

  • 1 — Leave authorized.
  • 0 — Do not leave authorized.
Default 1
Enum01
Example: leave_authorized=0
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/deletesshkey?file=%2Froot%2F.ssh%2Ftest&leave_authorized=0'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "file": "/root/.ssh/test" }, "metadata": { "command": "deletesshkey", "reason": "OK", "result": 1, "version": 1 } }

Request

This function generates an SSH key pair.

Security
BasicAuth
Query
abort_on_existing_keyinteger

Whether to abort the function if the user already has a key with the same name.

  • 1 — Abort.
  • 0 — Continue.
Default 1
Enum01
Example: abort_on_existing_key=1
algorithmstring

The key's encryption algorithm. The parameter defaults to the system's default algorithm.

Enum"rsa2""dsa"
Example: algorithm=dsa
bitsinteger

The key's bits:

  • 1024 — The DSA algorithm's default value.
  • 2048
  • 4096 — The RSA algorithm's default value.
Enum102420484096
Example: bits=2048
commentstring

A comment.

Default ""
Example: comment=NoComment
namestring

The key's filename.

This parameter defaults to id_rsa if the algorithm is RSA, and id_dsa if the algorithm is DSA.

Default "id_rsa"
Example: name=KeyFile
passphrasestring

The key's secure passphrase.

Default ""
Example: passphrase=123456luggage
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/generatesshkeypair?abort_on_existing_key=1&algorithm=dsa&bits=2048&comment=NoComment&name=KeyFile&passphrase=123456luggage'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "fingerprint": null, "name": "KeyFile" }, "metadata": { "command": "generatesshkeypair", "reason": "OK", "result": 1, "version": 1 } }

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

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