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

Request

This function enables AutoSSL for an account's specified domains.

Security
BasicAuth
Query
domainstring(domain)required

Enable AutoSSL for this domain.

Note:

For multiple domains, increment the parameter name. For example, domain-1, domain-2, and domain-3.

Examples:
domain=domain-1=cpcalendars.example.com&domain-2=cpcontacts.example.com
domain=cpcalendars.example.com
usernamestring(username)required

The cPanel user's account.

Example: username=username
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remove_autossl_user_excluded_domains?domain=cpcalendars.example.com&username=username'

Responses

HTTP Request was successful.

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

Request

This function resets the AutoSSL registration with a remote AutoSSL provider.

Security
BasicAuth
Query
providerstringrequired

The AutoSSL provider's name.

Example: provider=cPanel
x_*string

Additional parameters which you wish to pass to the AutoSSL provider.

Note:

These additional parameters begin with the x_ prefix. For example, the Let's Encrypt provider accepts the x_terms_of_service_accepted parameter, to which you would pass the URL of the terms of service that you accept.

Example: x_*=(varies)
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/reset_autossl_provider?provider=cPanel&x_*=%28varies%29'

Responses

HTTP Request was successful.

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

Request

This function sets values for AutoSSL's metadata keys. This allows you to replace certificates that AutoSSL did not issue and toggle other AutoSSL notifications.

Note:

We recommend that you use the WHM API 1 set_autossl_metadata_key function instead.

Information:

  • You can enter more than one key and value pair in the metadata_json JSON hash.
  • Any keys that you do not explicitly define will adopt the system's default value.
Security
BasicAuth
Query
metadata_jsonobjectrequired

JSON-encoded object of metadata keys and values that control AutoSSL's behavior.

Example: metadata_json={"clobber_externally_signed":1,"notify_autossl_expiry":1,"notify_autossl_expiry_coverage":1,"notify_autossl_expiry_coverage_user":1,"notify_autossl_expiry_user":1,"notify_autossl_renewal":1,"notify_autossl_renewal_coverage":1,"notify_autossl_renewal_coverage_reduced":1,"notify_autossl_renewal_coverage_reduced_user":1,"notify_autossl_renewal_coverage_user":1,"notify_autossl_renewal_uncovered_domains":1,"notify_autossl_renewal_uncovered_domains_user":1,"notify_autossl_renewal_user":1}
metadata_json.​clobber_externally_signedinteger

Whether to allow AutoSSL to replace certificates that none of this system’s AutoSSL modules issued. When you enable this option, AutoSSL will install certificates that replace users’ Certificate Authority (CA) issued certificates if they are invalid or expire within three days.

  • 1 - Replace certificates not issued by the AutoSSL system.
  • 0 - Only replace certificates issued by the AutoSSL system.
Default 0
Enum01
Example: 1
metadata_json.​notify_autossl_expiryinteger

Whether to send a notification when an AutoSSL certificate expires. This occurs when AutoSSL cannot request a new certificate.

  • 1 - Send a notification.
  • 0 - Do not send a notification.

Notes:

This can happen if all of a website’s domains fail Domain Control Validation (DCV), or if the AutoSSL provider has not issued a certificate in response to a request.

Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_expiry_coverageinteger

Whether to send a notification if at least one currently-secured domain will lose coverage when the certificate renews.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_expiry_coverage_userinteger

Whether to send a notification if at least one of a user's currently-secured domains will lose coverage when the certificate renews.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_expiry_userinteger

Whether to send a notification when a user's AutoSSL certificate expires. This occurs when AutoSSL cannot request a new certificate for a user.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_renewalinteger

Whether to send a notification when AutoSSL successfully renews a certificate.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_renewal_coverageinteger

Whether to send a notification if a currently-secured domain fails DCV and the certificate has not reached its renewal period.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_renewal_coverage_reducedinteger

Whether to send a notification when AutoSSL has renewed a certificate and the new certificate lacks at least one domain that the previous certificate secured.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_renewal_coverage_reduced_userinteger

Whether to send a notification when AutoSSL has renewed a certificate for a user and the new certificate lacks at least one domain that the previous certificate secured.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_renewal_coverage_userinteger

Whether to send a notification if a currently-secured domain fails DCV and the certificate has not reached its renewal period.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_renewal_uncovered_domainsinteger

Whether to send a notification when AutoSSL has renewed a certificate and the new certificate lacks one or more of the website’s domains.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_renewal_uncovered_domains_userinteger

Whether to send a notification when AutoSSL has renewed a certificate for a user and the new certificate lacks one or more of the website’s domains.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
metadata_json.​notify_autossl_renewal_userinteger

Whether to send a notification when AutoSSL successfully renews a certificate for a user.

  • 1 - Send a notification.
  • 0 - Do not send a notification.
Default 1
Enum01
Example: 1
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_autossl_metadata?metadata_json={%22clobber_externally_signed%22%3A1%2C%22notify_autossl_expiry%22%3A1%2C%22notify_autossl_expiry_coverage%22%3A1%2C%22notify_autossl_expiry_coverage_user%22%3A1%2C%22notify_autossl_expiry_user%22%3A1%2C%22notify_autossl_renewal%22%3A1%2C%22notify_autossl_renewal_coverage%22%3A1%2C%22notify_autossl_renewal_coverage_reduced%22%3A1%2C%22notify_autossl_renewal_coverage_reduced_user%22%3A1%2C%22notify_autossl_renewal_coverage_user%22%3A1%2C%22notify_autossl_renewal_uncovered_domains%22%3A1%2C%22notify_autossl_renewal_uncovered_domains_user%22%3A1%2C%22notify_autossl_renewal_user%22%3A1}'

Responses

HTTP Request was successful.

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

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