cPanel Mail API

The Mail module for WHM API 1.

GitHub OpenAPI

Operations 51

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /apply_dmarc Apply a DMARC record to a domain · Apply a DMARC record to a domain #
Ask an LLM
“How do I put a DMARC record on my domain?”
“Can I apply a custom DMARC policy to several domains at once?”
Tell an agent
Apply DMARC policy {policy} to {domain}.
Set a custom DMARC record on {domain} with policy {policy}.
GET /block_incoming_email_from_country Block emails from a country · Add block on emails from specific countries #
Ask an LLM
“How do I stop mail from a particular country?”
“Can I block incoming email from a single country code?”
Tell an agent
Block incoming email from country {country_code}.
Stop all mail coming from {country_code}.
GET /block_incoming_email_from_domain Block emails from a domain · Add block on emails from specific domains #
Ask an LLM
“How do I stop mail from a specific sender domain?”
“Can I block email from one domain on my server?”
Tell an agent
Block incoming email from {domain}.
Stop mail from the {domain} domain.
GET /disable_dkim Remove a domain's DKIM records · Disable domain's DKIM records #
Ask an LLM
“How do I remove DKIM from a domain?”
“Can I turn off DomainKeys Identified Mail for a domain?”
Tell an agent destructive · confirm first
Disable DKIM for {domain}.
Remove the DKIM records on {domain}.
GET /disable_mail_sni Disable mail SNI (deprecated) · (Deprecated) Disable SNI mail services for domains #
Ask an LLM
“Can I disable SNI mail services for my domains?”
“Is there a way to turn off mail SNI on a domain?”
Tell an agent destructive · confirm first
Disable SNI mail services for {domain}.
Turn off mail SNI on {domain}.
GET /emailtrack_stats Get email delivery statistics for an account · Return cPanel account email tracking statistics #
Ask an LLM
“How many emails has a cPanel account sent?”
“Can I get email delivery stats for one user over a date range?”
Tell an agent
Get email delivery statistics for {user}.
Show email stats for {user} from {starttime} to {endtime}.
GET /emailtrack_user_stats Get email delivery stats for all users · Return all cPanel accounts email tracking statistics #
Ask an LLM
“Can I see email delivery statistics for every user on the server?”
“Which users sent the most mail last week?”
Tell an agent
Get email delivery statistics for all users.
Show email stats for {sender} across all users.
GET /enable_dkim Enable DKIM for a domain · Enable domain's DKIM records #
Ask an LLM
“How do I turn on DomainKeys Identified Mail for a domain?”
“Can I enable DKIM signing for several domains?”
Tell an agent
Enable DKIM for {domain}.
Turn on DomainKeys Identified Mail on {domain}.
GET /enable_mail_sni Enable SNI mail services · Enable SNI mail services for domains #
Ask an LLM
“How do I enable SNI for mail on my domains?”
“Is it possible to turn on mail SNI for a domain?”
Tell an agent
Enable SNI mail services for {domain}.
Turn on mail SNI on {domain}.
GET /ensure_dkim_keys_exist Ensure DKIM keys are valid · Validate domain's DKIM keys #
Ask an LLM
“How do I make sure my DKIM keys are valid?”
“What happens if a domain's DKIM key is missing or weak?”
Tell an agent
Ensure DKIM keys exist for {domain}.
Validate and replace the DKIM key on {domain}.
GET /exim_configuration_check Repair the Exim configuration · Repair Exim configuration file #
Ask an LLM
“How do I fix errors in the Exim configuration file?”
“Can Exim repair its own configuration automatically?”
Tell an agent
Repair the Exim configuration file.
Scan and fix Exim configuration errors.
GET /expunge_mailbox_messages Delete mailbox messages by Dovecot query · Remove email account messages by Dovecot query #
Ask an LLM
“How do I delete messages in a mailbox that match a Dovecot search?”
“Can I remove old mail from a mailbox with a query?”
Tell an agent destructive · confirm first
Delete messages in {account}/{mailbox} matching {query}.
Remove all messages in {account}'s {mailbox} mailbox matching {query}.
GET /expunge_messages_for_mailbox_guid Delete mailbox messages by GUID · Remove email account messages by mailbox GUID #
Ask an LLM
“How do I delete messages from a mailbox using its GUID?”
“Can I remove mail from a mailbox by its globally unique identifier?”
Tell an agent destructive · confirm first
Delete messages in {account} mailbox {mailbox_guid} matching {query}.
Remove all messages from mailbox GUID {mailbox_guid} on {account}.
GET /fetch_dkim_private_keys Get a domain's DKIM private key · Return domain's DKIM private key #
Ask an LLM
“How do I download the private key for a DKIM record?”
“Where can I get a domain's DKIM private key in PEM format?”
Tell an agent
Fetch the DKIM private key for {domain}.
Download the private key used for DKIM on {domain}.
GET /fetch_mail_queue Get the server mail queue · Return server mail queue contents #
Ask an LLM
“What mail is sitting in the server's mail queue?”
“Can I see the messages waiting to be delivered?”
Tell an agent
Show the server mail queue.
List every message waiting in the mail queue.
GET /generate_mobileconfig Create a mobile email profile · Create email account mobile profile configuration #
Ask an LLM
“How do I generate a mobile configuration profile for an email account?”
“Can I create a mobileconfig file for an account with SSL?”
Tell an agent
Generate a mobileconfig profile for {account} with SSL={use_ssl}.
Create a mobile profile for {account} using SSL {use_ssl}.
GET /get_default_dmarc_record Get the server's default DMARC record · Get the server's default DMARC record #
Ask an LLM
“What DMARC record does the server use for new accounts?”
“Can I see the default DMARC policy?”
Tell an agent
Get the server's default DMARC record.
Show the DMARC policy used for new accounts.
GET /get_mailbox_status Check a mailbox's status · Return cPanel account mailboxes status by name #
Ask an LLM
“Is a cPanel mailbox ready to receive emails?”
“What are the status flags on a mail account's mailbox?”
Tell an agent
Check the mailbox status for {account}.
Show whether {account} can receive mail.
GET /get_mailbox_status_list Get mailbox status for an account · Return cPanel account mailboxes status list #
Ask an LLM
“Can I list all mailboxes on an email account?”
“What does the mailbox status list for an account show?”
Tell an agent
Get the mailbox status list for {account}.
Show every mailbox on {account}.
GET /get_unique_recipient_count_per_sender_for_user Count unique recipients per sender for a user · Return cPanel account unique email recipients #
Ask an LLM
“How many unique recipients did a particular user send mail to?”
“Can I see per-sender recipient counts for one cPanel account?”
Tell an agent
Count unique recipients per sender for {user} from {start_time} to {end_time}.
Show per-sender recipient totals for {user} in the last month.
GET /get_unique_sender_recipient_count_per_user Count unique recipients across all users · Return all cPanel account unique email recipients #
Ask an LLM
“Which users sent mail to the most unique addresses?”
“What is the total unique recipient count across all cPanel accounts?”
Tell an agent
Show the unique recipient count per system user from {start_time} to {end_time}.
List all users' unique recipient totals.
GET /get_user_email_forward_destination Get a user's email forward destination · Return cPanel account forward destination #
Ask an LLM
“Where is a system user's email being forwarded to?”
“Can I check the forward destination for a cPanel account?”
Tell an agent
Show the forward destination for {user}.
Get where {user}'s email is being forwarded.
GET /hold_outgoing_email Hold a user's outgoing email · Add cPanel account to outbound email hold queue #
Ask an LLM
“How do I stop a cPanel user from sending mail to external addresses?”
“Can I put a user's outgoing mail in the queue?”
Tell an agent
Hold outgoing email for {user}.
Put {user}'s outgoing mail in the queue.
GET /install_dkim_private_keys Install existing DKIM private keys · Install existing private key to DKIM record #
Ask an LLM
“How do I install my own private key for DKIM instead of generating one?”
“Can I use a PEM-formatted RSA key for DKIM?”
Tell an agent
Install private key {key} for DKIM on {domain}.
Use my existing RSA key {key} for DKIM on {domain}.
GET /install_spf_records Install SPF records on the DNS server · Install domain SPF record #
Ask an LLM
“How do I add a Sender Policy Framework record to a domain's DNS?”
“Can I install an SPF record for several domains at once?”
Tell an agent
Install SPF record {record} for {domain} on the DNS server.
Add SPF {record} to {domain} DNS.
GET /is_sni_supported Check if the server supports SNI · Return server SNI support status #
Ask an LLM
“Does the server support Server Name Indication for mail?”
“Is SNI enabled on this mail server?”
Tell an agent
Check whether the server supports SNI.
Tell me if mail SNI is supported.
GET /list_blocked_incoming_email_countries List countries blocked from sending email · Return blocked email countries list #
Ask an LLM
“Which countries are blocked from sending mail to this server?”
“Can I see the incoming email country block list?”
Tell an agent
List the countries blocked from sending email.
Show incoming email block list by country.
GET /list_blocked_incoming_email_domains List domains blocked from sending email · Return blocked email domains list #
Ask an LLM
“Which domains are blocked from sending mail to this server?”
“Can I see the incoming email domain block list?”
Tell an agent
List the domains blocked from sending email.
Show incoming email block list by domain.
GET /list_pops_for List a user's email accounts · Return cPanel account's email accounts #
Ask an LLM
“What email accounts does a cPanel user own?”
“Can I list the email addresses under a user's account?”
Tell an agent
List the email accounts for {user}.
Show all email addresses owned by {user}.
GET /mail_sni_status Check a domain's SNI mail services status · Return domain's SNI mail services status #
Ask an LLM
“Is SNI enabled for a specific domain's mail services?”
“What is the mail SNI status for one domain?”
Tell an agent
Check the mail SNI status for {domain}.
Tell me whether SNI mail services are on for {domain}.
GET /normalize_user_email_configuration Repair a user's email settings · Repair misconfigured email settings #
Ask an LLM
“How do I fix a cPanel user's misconfigured email settings?”
“Can I repair email file ownership and permissions for a user?”
Tell an agent
Repair the email configuration for {username}.
Fix misconfigured email settings for {username}.
GET /rebuild_mail_sni_config Rebuild mail SNI configuration files · Rebuild mail SNI configuration files #
Ask an LLM
“How do I regenerate the mail SNI configuration files?”
“Can I reload Dovecot after rebuilding mail SNI config?”
Tell an agent
Rebuild the mail SNI configuration files.
Rebuild mail SNI config and reload Dovecot ({reload_dovecot}).
GET /release_outgoing_email Release a user's queued outgoing emails · Release cPanel account queued outgoing emails #
Ask an LLM
“How do I release outgoing mail that was held for a user?”
“Can I release a cPanel user's queued emails?”
Tell an agent
Release the outgoing email queue for {user}.
Release held mail for {user}.
GET /remove_dmarc Remove a domain's DMARC record · Remove domains' DMARC records #
Ask an LLM
“How do I remove the DMARC record from a domain?”
“Can I delete DMARC records from temporary domains?”
Tell an agent destructive · confirm first
Remove the DMARC record from {domain}.
Delete the DMARC record for {domain}.
GET /save_spamd_config Update Apache SpamAssassin configuration · Update Apache SpamAssassin™ configuration #
Ask an LLM
“How do I change the maximum number of children SpamAssassin spawns?”
“Can I set allowed IPs and connection limits for spamd?”
Tell an agent
Set SpamAssassin max children to {maxchildren}.
Allow IPs {allowedips} to access spamd with {maxconnperchild} connections per child.
GET /set_default_dmarc_record Set the server's default DMARC record · Set the server's default DMARC record #
Ask an LLM
“How do I set a default DMARC policy for new accounts?”
“Can I remove the custom default DMARC record?”
Tell an agent
Set the default DMARC record to {record}.
Make {record} the server's default DMARC record.
GET /set_manual_mx_redirects Add manual MX redirects for domains · Add manual mail exchanger redirect record #
Ask an LLM
“How do I bypass DNS MX lookups for a domain by redirecting mail?”
“Can I add several manual MX redirects at once?”
Tell an agent
Add manual MX redirect {mx_host} for {domain}.
Redirect {domain} mail to {mx_host} via manual MX.
GET /set_user_email_forward_destination Set a user's email forward destination · Update cPanel account email forward destination #
Ask an LLM
“How do I forward a system user's email to another address?”
“Can I forward mail for several users to different destinations?”
Tell an agent
Forward {user}'s email to {forward_to}.
Set {user}'s email forward destination to {forward_to}.
GET /suspend_outgoing_email Suspend outgoing email for an account · Suspend cPanel account outgoing email #
Ask an LLM
“How do I stop a cPanel account from sending email to external addresses?”
“Can I force new mail from an account to fail before it hits the queue?”
Tell an agent destructive · confirm first
Suspend outgoing email for {user}.
Block account {user} from sending mail externally.
GET /terminate_cpuser_mailbox_sessions End IMAP and POP3 connections for a cPanel account · Stop cPanel account IMAP and POP3 connections #
Ask an LLM
“How do I stop all IMAP and POP3 connections for a cPanel account?”
“Does terminating mailbox sessions affect the default email address too?”
Tell an agent destructive · confirm first
Terminate all IMAP and POP3 connections for {username}.
End every mailbox session on cPanel account {username}.
GET /unblock_incoming_email_from_country Unblock email from a country · Remove block on emails from specific countries #
Ask an LLM
“How do I allow incoming mail from a specific country?”
“Can I unblock emails from a single country without touching other blocks?”
Tell an agent
Unblock incoming email from country {country_code}.
Allow mail from {country_code} again.
GET /unblock_incoming_email_from_domain Unblock incoming email from a domain · Remove block on emails from specific domains #
Ask an LLM
“How do I let mail from a blocked domain come into my server again?”
“What happens if a domain is already not blocked?”
Tell an agent
Unblock incoming email from {domain}.
Allow mail from {domain} to reach the server.
GET /unset_manual_mx_redirects Remove a domain's manual MX redirect · Remove manual mail exchanger redirect record #
Ask an LLM
“How do I remove a manual mail exchanger redirect for a domain?”
“Does removing a manual MX redirect also clear the /etc/manualmx file entry?”
Tell an agent destructive · confirm first
Remove the manual MX redirect for {domain}.
Clear the manual MX redirect entry for {domain} from /etc/manualmx.
GET /unsuspend_outgoing_email Unsuspend outgoing email for a cPanel account · Unsuspend account outgoing email #
Ask an LLM
“How do I restore outgoing email for a cPanel account?”
“Can I unsuspend outgoing mail for just one user?”
Tell an agent
Unsuspend outgoing email for {user}.
Restore outgoing mail for cPanel account {user}.
GET /validate_current_dkims Validate DKIM records for domains · Validate DKIM records #
Ask an LLM
“How do I check that my DKIM records are set up correctly?”
“Can I validate DKIM for several domains at once?”
Tell an agent
Validate the DKIM records for {domain}.
Check that DKIM is configured properly on {domain}.
GET /validate_current_dmarcs Validate DMARC records for domains · Validate DMARC records #
Ask an LLM
“How do I check my DMARC record?”
“Can I validate DMARC for multiple domains?”
Tell an agent
Validate the DMARC record for {domain}.
Check that DMARC is set up correctly on {domain}.
GET /validate_current_installed_exim_config Validate the current Exim configuration · Validate Exim configuration #
Ask an LLM
“How do I check that the installed Exim configuration is valid?”
“Can I validate the system's current Exim setup?”
Tell an agent
Validate the current installed Exim configuration.
Check that the system's Exim configuration is correct.
GET /validate_current_ptrs Validate PTR records for a domain · Validate domain PTR records #
Ask an LLM
“How do I check that my domain's PTR records are correct?”
“Can I validate PTR and reverse DNS for a domain?”
Tell an agent
Validate the PTR records for {domain}.
Check that {domain} has valid pointer records.
GET /validate_current_spfs Validate SPF records for domains · Validate domain SPF records #
Ask an LLM
“How do I check that my SPF record is valid?”
“Can I validate SPF for several domains at once?”
Tell an agent
Validate the SPF record for {domain}.
Check that SPF is configured properly on {domain}.
GET /validate_exim_configuration_syntax Validate Exim configuration file syntax · Validate Exim configure file syntax #
Ask an LLM
“How do I check the syntax of an Exim configuration file?”
“Can I validate a configuration section's syntax without the whole file?”
Tell an agent
Validate the syntax of Exim configuration {cfg_text}.
Check the syntax of the {section} section of the Exim config.

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:cpanel-mail-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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://artifacts.apis.io/cpanel/openapi/cpanel-mail-api-openapi.yml