# cPanel Mail API

**Canonical:** https://apis.io/apis/cpanel/cpanel-mail-api/  
**Provider:** cPanel — https://apis.io/providers/cpanel/  
**Base URL:** https://{host}:2083/execute  
**Documentation:** https://api.docs.cpanel.net/cpanel/introduction/

cPanel Mail API is one of 144 APIs that [cPanel](https://apis.io/providers/cpanel/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Mail. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, and authentication docs.

The Mail module for WHM API 1.

## Operations (51)

| Method | Path | Summary |
|---|---|---|
| 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_search` | Return email delivery records by search criteria |
| 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 |

## Machine-readable artifacts (7)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/cpanel/refs/heads/main/openapi/cpanel-mail-api-openapi.yml
- **Documentation** — https://api.docs.cpanel.net/cpanel/introduction/
- **APIReference** — https://api.docs.cpanel.net/specifications/cpanel.openapi
- **Authentication** — https://api.docs.cpanel.net/cpanel/tokens/
- **Documentation** — https://api.docs.cpanel.net/whm/introduction/
- **APIReference** — https://api.docs.cpanel.net/specifications/whm.openapi
- **Authentication** — https://api.docs.cpanel.net/whm/tokens/

## Other cPanel APIs (12)

- [cPanel API 2 (Legacy)](https://apis.io/apis/cpanel/cpanel-api-2/)
- [Manage2 API](https://apis.io/apis/cpanel/manage2/)
- [cPanel 360 Monitoring API](https://apis.io/apis/cpanel/cpanel-360-monitoring-api/)
- [cPanel Account Creation API](https://apis.io/apis/cpanel/cpanel-account-creation-api/)
- [cPanel Account Enhancements API](https://apis.io/apis/cpanel/cpanel-account-enhancements-api/)
- [cPanel Account Management API](https://apis.io/apis/cpanel/cpanel-account-management-api/)
- [cPanel Account Restoration API](https://apis.io/apis/cpanel/cpanel-account-restoration-api/)
- [cPanel Accounts API](https://apis.io/apis/cpanel/cpanel-accounts-api/)
- [cPanel Addon Domain API](https://apis.io/apis/cpanel/cpanel-addondomain-api/)
- [cPanel API Execution API](https://apis.io/apis/cpanel/cpanel-api-execution-api/)
- [cPanel Applications API](https://apis.io/apis/cpanel/cpanel-applications-api/)
- [cPanel Authentication API](https://apis.io/apis/cpanel/cpanel-authentication-api/)

## Tags

Mail

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/cpanel/cpanel-mail-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/cpanel/.
