cPanel Mail API

The Mail module for WHM API 1.

Operations 51

GET /apply_dmarc Apply a DMARC record to a domain #
GET /block_incoming_email_from_country Add block on emails from specific countries #
GET /block_incoming_email_from_domain Add block on emails from specific domains #
GET /disable_dkim Disable domain's DKIM records #
GET /disable_mail_sni (Deprecated) Disable SNI mail services for domains #
GET /emailtrack_stats Return cPanel account email tracking statistics #
GET /emailtrack_user_stats Return all cPanel accounts email tracking statistics #
GET /enable_dkim Enable domain's DKIM records #
GET /enable_mail_sni Enable SNI mail services for domains #
GET /ensure_dkim_keys_exist Validate domain's DKIM keys #
GET /exim_configuration_check Repair Exim configuration file #
GET /expunge_mailbox_messages Remove email account messages by Dovecot query #
GET /expunge_messages_for_mailbox_guid Remove email account messages by mailbox GUID #
GET /fetch_dkim_private_keys Return domain's DKIM private key #
GET /fetch_mail_queue Return server mail queue contents #
GET /generate_mobileconfig Create email account mobile profile configuration #
GET /get_default_dmarc_record Get the server's default DMARC record #
GET /get_mailbox_status Return cPanel account mailboxes status by name #
GET /get_mailbox_status_list Return cPanel account mailboxes status list #
GET /get_unique_recipient_count_per_sender_for_user Return cPanel account unique email recipients #
GET /get_unique_sender_recipient_count_per_user Return all cPanel account unique email recipients #
GET /get_user_email_forward_destination Return cPanel account forward destination #
GET /hold_outgoing_email Add cPanel account to outbound email hold queue #
GET /install_dkim_private_keys Install existing private key to DKIM record #
GET /install_spf_records Install domain SPF record #
GET /is_sni_supported Return server SNI support status #
GET /list_blocked_incoming_email_countries Return blocked email countries list #
GET /list_blocked_incoming_email_domains Return blocked email domains list #
GET /list_pops_for Return cPanel account's email accounts #
GET /mail_sni_status Return domain's SNI mail services status #
GET /normalize_user_email_configuration Repair misconfigured email settings #
GET /rebuild_mail_sni_config Rebuild mail SNI configuration files #
GET /release_outgoing_email Release cPanel account queued outgoing emails #
GET /remove_dmarc Remove domains' DMARC records #
GET /save_spamd_config Update Apache SpamAssassin™ configuration #
GET /set_default_dmarc_record Set the server's default DMARC record #
GET /set_manual_mx_redirects Add manual mail exchanger redirect record #
GET /set_user_email_forward_destination Update cPanel account email forward destination #
GET /suspend_outgoing_email Suspend cPanel account outgoing email #
GET /terminate_cpuser_mailbox_sessions Stop cPanel account IMAP and POP3 connections #
GET /unblock_incoming_email_from_country Remove block on emails from specific countries #
GET /unblock_incoming_email_from_domain Remove block on emails from specific domains #
GET /unset_manual_mx_redirects Remove manual mail exchanger redirect record #
GET /unsuspend_outgoing_email Unsuspend account outgoing email #
GET /validate_current_dkims Validate DKIM records #
GET /validate_current_dmarcs Validate DMARC records #
GET /validate_current_installed_exim_config Validate Exim configuration #
GET /validate_current_ptrs Validate domain PTR records #
GET /validate_current_spfs Validate domain SPF records #
GET /validate_exim_configuration_syntax Validate Exim configure file syntax #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cpanel-mail-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cpanel-mail-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: cs@cpanel.net
    name: WebPros International, LLC
    url: https://cpanel.net/support/
  description: WHM API.
  license:
    name: cPanel License
    url: https://cpanel.net/legal-notices/
  termsOfService: https://cpanel.net/legal-notices/
  title: WHM Mail API
  version: 11.137.9999.106
  x-api-evangelist-provenance: 'Harvested verbatim from cPanel''s developer portal on 2026-09-05 via the MCP tool get-full-api-description at https://api.docs.cpanel.net/mcp. ONE mechanical change was made before storage: example values containing PEM private-key or certificate blocks, and AWS-access-key-shaped example strings, were replaced with REDACTED_* placeholders so the file can be stored in a public git repository without tripping secret scanning. No path, operation, parameter, schema or description was altered, added or removed.'
servers:
- description: A server running WHM.
  url: https://{host}:{port}/json-api
  variables:
    host:
      default: whm-server.tld
      description: The hostname of a server running WHM.
    port:
      default: '2087'
      description: The WHM port.
security:
- BasicAuth: []
tags:


# --- truncated at 32 KB (255 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cpanel/refs/heads/main/openapi/cpanel-mail-api-openapi.yml