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

Remove Exim configuration files after failed update

Request

This function removes in-progress Exim configuration files after a failed update to Exim. When cPanel & WHM attempts to update an Exim configuration, the system creates dry run files to replace of the ordinary configuration files.

Note:

  • If the update fails, the system leaves these dry run files in place.
  • When the user accesses the Advanced Editor section of WHM's Exim Configuration Manager interface (Home >> Service Configuration >> Exim Configuration Manager), they access these dry run files instead of the actual configuration files.
Security
BasicAuth
curl -i -X GET \
  -u <username>:<password> \
  https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remove_in_progress_exim_config_edit

Responses

HTTP Request was successful.

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

Request

This function validates the system's current Exim configuration.

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

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject
metadataobject
Response
application/json
{ "data": { "message": "<pre>Doing Dry Run\nDry Run ok\nEnabled system filter options: attachments| fail_spam_score_over_int|spam_rewrite\nEnabled ACL options in block ACL_MAIL_PRE_BLOCK: default_mail_pre\nEnabled ACL options in block ACL_RBL_BLOCK: primary_hostname_bl\n Enabled ACL options in block ACL_RECIPIENT_POST_BLOCK: default_recipient_post\nEnabled ACL options in block ACL_SPAM_SCAN_CHECK_BLOCK: default_spam_scan_check\nEnabled ACL options in block ACL_CHECK_MESSAGE_PRE_BLOCK: default_check_message_pre \nEnabled ACL options in block ACL_CONNECT_POST_BLOCK: default_connect_post \nEnabled ACL options in block ACL_CONNECT_BLOCK: ratelimit|spammerlist \nEnabled ACL options in block ACL_POST_RECP_VERIFY_BLOCK: dictionary_attack\nEnabled ACL options in block ACL_IDENTIFY_SENDER_BLOCK: default_identify_sender\nEnabled ACL options in block ACL_MAIL_BLOCK: requirehelo| requirehelonoforge|requirehelosyntax\nEnabled ACL options in block ACL_RATELIMIT_SPAM_BLOCK: ratelimit_spam_score_over_int\nEnabled ACL options in block ACL_CHECK_MESSAGE_POST_BLOCK: default_check_message_post\nEnabled ACL options in block ACL_POST_SPAM_SCAN_CHECK_BLOCK: mailproviders \nEnabled ACL options in block ACL_SPAM_SCAN_BLOCK: default_spam_scan \nEnabled ACL options in block ACL_RATELIMIT_BLOCK: 0tracksenders\nEnabled ACL options in block ACL_NOTQUIT_BLOCK: ratelimit\nEnabled ACL options in block ACL_RECP_VERIFY_BLOCK: default_recp_verify\nEnabled ACL options in block ACL_PRE_SPAM_SCAN: mailproviders\nEnabled ACL options in block ACL_SPAM_BLOCK: deny_spam_score_over_int\nEnabled ACL options in block ACL_EXISCAN_BLOCK: default_exiscan\nEnabled ACL options in block ACL_RECIPIENT_BLOCK: default_recipient\nEnabled ACL options in block ACL_MAIL_POST_BLOCK: default_mail_post\nThe system detected spam handling in acls and will now disable Apache SpamAssassin in routers and transports!\nThe Apache SpamAssassin method remains unchanged.\nConfigured options list is:\nACL: acl_smtp_connect is active\nACL: acl_smtp_data is active\nACL: acl_smtp_mail is active\nACL: acl_smtp_notquit is active\nACL: acl_smtp_rcpt is active\nProvided options list is: daemon_smtp_ports| tls_on_connect_ports|system_filter_user|system_filter_group|tls_require_ciphers|hostlist loopback|hostlist senderverifybypass_hosts|hostlist skipsmtpcheck_hosts|hostlist spammeripblocks|hostlist backupmx_hosts|hostlist trustedmailhosts|hostlist relay_hosts| domainlist user_domains|remote_max_parallel|smtp_receive_timeout| ignore_bounce_errors_after|rfc1413_query_timeout|timeout_frozen_after|auto_thaw| callout_domain_negative_expire|callout_negative_expire|acl_smtp_connect| acl_smtp_data|acl_smtp_mail|acl_smtp_notquit|acl_smtp_rcpt|perl_at_start| daemon_smtp_ports|tls_on_connect_ports|system_filter_user|system_filter_ group|tls_require_ciphers|spamd_address\nExim Insert Regex is: virtual_userdelivery| virtual_aliases|lookuphost|virtual_user|address_pipe|virtual_sa_user|localuser\nExim Replace Regex is: virtual_sa_user|sa_localuser|virtual_sa_userdelivery| local_sa_delivery|central_filter|central_user_filter|democheck|fail_remote_domains| fixed_login|fixed_plain|has_alias_but_no_mailbox_discarded_to_prevent_loop|literal| local_delivery|local_delivery_spam|localuser|localuser_spam|lookuphost|remote_smtp| secure_login|secure_plain|userforward|virtual_aliases|virtual_aliases_nostar| virtual_user|virtual_user_spam|virtual_userdelivery|virtual_userdelivery_spam\nExim Match Insert Regex is: quota_directory|maildir_format\nExim version 4.76 #1 built 16- Aug-2011 11:41:07\nCopyright (c) University of Cambridge, 1995 - 2007\nBerkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (July 12, 2010)\nSupport for: crypteq iconv() IPv6 PAM Perl OpenSSL Content_Scanning DKIM Old_Demime Experimental_SPF Experimental_SRS\nLookups (built-in): lsearch wildlsearch nwildlsearch iplsearch dbm dbmnz passwd\nAuthenticators: cram_md5 dovecot plaintext spa\nRouters: accept dnslookup ipliteral manualroute queryprogram redirect\nTransports: appendfile/maildir autoreply pipe smtp\nSize of off_t: 8\n\n</pre>" }, "metadata": { "command": "validate_current_installed_exim_config", "reason": "Your configuration is currently valid.", "result": 1, "version": 1 } }

Validate Exim configure file syntax

Request

This function evaluates and validates an Exim configuration file's syntax.

Note:

On servers that run CentOS 7, you may see a named warning about the absence of SPF resource records on DNS.

  • This warning is not relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records.
  • Red Hat 7.1 and CentOS 7.1 both contain bind-9.9.4-23.el7, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors.
Security
BasicAuth
Query
cfg_textstring(HTML)

The Exim configuration file's raw text.

Note:

If you do not use this parameter, the function will analyze Exim's current configuration.

Example: cfg_text=RAW_CONFIGURATION_TEXT
sectionstring

The Exim configuration file's section to check.

Note:

If you use this parameter, pass only the desired section to validate as the cfg_text value.

Example: section=acl
curl -i -X GET \
  -u <username>:<password> \
  'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/validate_exim_configuration_syntax?cfg_text=RAW_CONFIGURATION_TEXT&section=acl'

Responses

HTTP Request was successful.

Bodyapplication/json
dataobject

An object containing a valid or invalid Exim configuration information.

Any of:

The function returns this object for an invalid Exim configuration.

metadataobject
Response
application/json
{ "command": "validate_exim_configuration_syntax", "data": { "broken_cfg_html": "RAW_CONFIGURATION_TEXT", "broken_cfg_text": "==>RAW_CONFIGURATION_TEXT<==\n", "error_line": 1, "error_msg": "This is an error message." }, "output": { "raw": "\n" }, "reason": "OK", "result": 1, "version": 1 }

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