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

Return system services and associated certificates

Request

This function lists the system's services and their associated certificates.

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

Responses

HTTP Request was successful.

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

Create self-signed SSL certificate

Request

This function generates a private key file, a certificate signing request (CSR), and a self-signed SSL certificate.

Security
BasicAuth
Query
domainsstring(domain)required

A comma-separated list of the certificate's domains.

Examples:
domains=domain=example1.com,example2.com,example3.com
domains=example.com
countryNamestring(ISO-3166-1 (alpha-2))

The certificate's country code.

If you do not use this parameter, your CSR will not include this field.

Example: countryName=US
emailAddressstring(email)

The certificate's contact email address.

If you do not use this parameter, your CSR will not include this field.

Example: emailAddress=username@example.com
keysizeinteger>= 1

The size of the certificate's key, in bits.

If you do not use this parameter, your CSR will not include this field.

Example: keysize=2048
localityNamestring

The certificate's city or locality.

If you do not use this parameter, your CSR will not include this field.

Example: localityName=Houston
organizationalUnitNamestring or null

The department of the organization that owns the certificate.

Default null
Example: organizationalUnitName=Development
organizationNamestring

The certificate's organization.

If you do not use this parameter, your CSR will not include this field.

Example: organizationName=Example, L.L.C.
passstring or null

The certificate's passphrase.

Default null
Example: pass=123456luggage
skip_certificateinteger

Whether the function will skip certificate generation.

  • 1 — Skip certificate generate (do not generate a certificate).
  • 0 — Do not skip certificate generation (generate a certificate).

Note:

The function will still generate a CSR and key and save both to the user's SSLStorage data store.

Default 0
Enum10
Example: skip_certificate=0
stateOrProvinceNamestring

The certificate's state or province name.

If you do not use this parameter, your CSR will not include this field.

Example: stateOrProvinceName=Texas
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/generatessl?domains=string&countryName=US&emailAddress=username%40example.com&keysize=2048&localityName=Houston&organizationalUnitName=Development&organizationName=Example%2C+L.L.C.&pass=123456luggage&skip_certificate=0&stateOrProvinceName=Texas'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "cert": "-----BEGIN CERTIFICATE-----\nMIIDVDCCAjygAwIBAgIFANMbQ1IwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwL\nZXhhbXBsZS5jb20wHhcNMjAwMzE2MTg1OTU4WhcNMjEwMzE2MTg1OTU4WjAWMRQw\nEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\nggEBALnif/SIEE3xfi7iXCI3Kk7yNFrKw9b3SbCwTFEV4HZZpX+gK0ZkwT1vkkT6\nIFs68DVJI9KxXycCY8ZVI64TeD5Hqqy3p9NAkALyfC9OJlDP/mAKjgUZYISMci4K\njuf252rrtox5I5DgbWfXGe12HAjOnQrNjJMvscU9DstXMjDtzrlpwHZ/PH+v/Rcw\nt1WwpcAVOFNxQq6Z0CDwKW/JsHu7tVRa57QMlLTm2BEMIPlTHHoHRJk0zOQuHP3x\n87eYpnCiE/WbC5xlfm912fnFvvECb/6OGtAsw7GC0KnovS1W+rPfZHAdbbA61ukU\nMh+U5VJaNot/kqfbJYpkMD1VRu8CAwEAAaOBqDCBpTAdBgNVHQ4EFgQUSU78eVCc\nJPFAzdImFwAufRu+2WEwCQYDVR0TBAIwADBCBgNVHSMEOzA5gBRJTvx5UJwk8UDN\n0iYXAC59G77ZYaEapBgwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb22CBQDTG0NSMB0G\nA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAWBgNVHREEDzANggtleGFtcGxl\nLmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAf9dzrKj4LGvkBN3q0VHvPsKicl8tABxK\nuv4vKoiAXuh7R9k2bnFqpfvDa7j2qbBd5Gh4ctjdwTv7eA/E0sELgxlezcx9grgX\nCk//GRieAoEj6ZOx1AdKw/Pj6jQyMpU9mQi7+nbpcl1CmQlBc9c2OiayjAAwxm1s\n+Uj7C9+OOkFXeLt/adurcKHhDO3tVD9fqr+pFiVjJOyuIr+T/84gAUAK4RxipaDg\nf35OapjaVQesolECPEP9l/ajf5e2C33JBDwoVqa3b7wwhStN4YpF+7SAd74K1QRz\nrPum8QKnzZjwtx0OBRJl/CHQBz4u0LJGBH4vXhgzzoAcdlGouKf8RA==\n-----END CERTIFICATE-----\n", "cert_id": "example_com_a2459_9d253_1405012775_521f3620ac92180d24a74813a921b23e", "certfile": "/var/cpanel/ssl/system/certs/example_com_e0054_da789_1405012513_401c27501f5e0dd8d1b1d9caa902a0c8.crt", "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIChDCCAWwCAQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3\nDQEBAQUAA4IBDwAwggEKAoIBAQC54n/0iBBN8X4u4lwiNypO8jRaysPW90mwsExR\nFeB2WaV/oCtGZME9b5JE+iBbOvA1SSPSsV8nAmPGVSOuE3g+R6qst6fTQJAC8nwv\nTiZQz/5gCo4FGWCEjHIuCo7n9udq67aMeSOQ4G1n1xntdhwIzp0KzYyTL7HFPQ7L\nVzIw7c65acB2fzx/r/0XMLdVsKXAFThTcUKumdAg8ClvybB7u7VUWue0DJS05tgR\nDCD5Uxx6B0SZNMzkLhz98fO3mKZwohP1mwucZX5vddn5xb7xAm/+jhrQLMOxgtCp\n6L0tVvqz32RwHW2wOtbpFDIflOVSWjaLf5Kn2yWKZDA9VUbvAgMBAAGgKTAnBgkq\nhkiG9w0BCQ4xGjAYMBYGA1UdEQQPMA2CC2V4YW1wbGUuY29tMA0GCSqGSIb3DQEB\nCwUAA4IBAQCEPc5HD2KRQpqqm7aG6Y/oOnbGALi7GcOsr/vo+voWRDhC/nTAC9vp\nDXEjWY4FfA7N1VSgH5f04k40SBWlfvgCzQAB2AfLEo6LReNv1oCpojvKZVbJq+pq\nKTEMhkFzj4CBTG2gt9rAhKmNai7AnvDWdrnulsVShAsQMYsEeVmCxfGE9w3IEmLP\nJSvUB6/RSPF8zB5yP6/tZy00k+Mt/959yPAxDicrNASbCA2/TkuaBEaP+2v9lJY7\nzg2Z1js/Nv/5DE+1sqp+7GI26M6ZCSNzSyTVs2MOl6ecJTxhRCbVTYFy9SDRtsGE\nVOpPe2+XTcBM/mGIIRJharQNgy7S8kZ0\n-----END CERTIFICATE REQUEST-----\n", "csr_id": "example_com_e0054_da789_96b6625681492b7c43844b6ec37764de", "csrfile": "/var/cpanel/ssl/system/csrs/example_com_a2459_9d253_d5edb563abb8dd426099bbb358c8f2bc.csr", "key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAueJ/9IgQTfF+LuJcIjcqTvI0WsrD1vdJsLBMURXgdlmlf6Ar\nRmTBPW+SRPogWzrwNUkj0rFfJwJjxlUjrhN4PkeqrLen00CQAvJ8L04mUM/+YAqO\nBRlghIxyLgqO5/bnauu2jHkjkOBtZ9cZ7XYcCM6dCs2Mky+xxT0Oy1cyMO3OuWnA\ndn88f6/9FzC3VbClwBU4U3FCrpnQIPApb8mwe7u1VFrntAyUtObYEQwg+VMcegdE\nmTTM5C4c/fHzt5imcKIT9ZsLnGV+b3XZ+cW+8QJv/o4a0CzDsYLQqei9LVb6s99k\ncB1tsDrW6RQyH5TlUlo2i3+Sp9slimQwPVVG7wIDAQABAoIBAGIHgzdwcjjIvKT5\nF2Gr+hH8RYQEHtfFPgWCVB0HDoMbr93omCndhNNjfZ4G0v2JzZgsZEn+5JFr/zZf\nPBvXhLhDj0za5hTQnaIQQ1GnQymnJx17M36Y7X+5mZWSV98ZJN4MRQ8763fCA7CZ\njcDfYtV6MPO7hwEwS+4azyyJZZzLRUP2Z8kpXv3PFlXUeddZHwQgyKRdLcQWXE/w\niFClYSfsk10y8Nm6BKzI6TkZS32zIGt3FdJ8+kARJteV0sg6hjPpZMH0223Cbn+h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101721a053024156a34e0df8a9c388d4.key", "sender": "admin", "sender_host": "hostname.example.com" }, "metadata": { "command": "generatessl", "reason": "Key, Certificate, and CSR generated OK", "result": 1, "version": 1 } }

Return domains with installed SSL certificates

Request

This function lists the server's domains with installed SSL certificates.

Security
BasicAuth
Query
registeredinteger

Whether to limit the results to certificates registered with a certificate authority (CA).

  • 1 — Registered certificates only.
  • 0 — All certificates.
Default 0
Enum10
Example: registered=1
userstring(username)

The cPanel username.

If you do not use this parameter, the function returns certificates for all accounts on the server.

Example: user=username
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/listcrts?registered=1&user=username'

Responses

HTTP Request was successful.

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

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