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: - description: The Mail module for WHM API 1. name: Mail paths: /apply_dmarc: get: description: 'This function applies a DMARC record to the specified domain(s). **Note:** You **cannot** modify DMARC records on temporary domains.' operationId: EmailAuth-apply_dmarc parameters: - description: 'The DMARC record to apply to the requested domains. **Note:** When using multiple policies, each policy must have a matching domain. When using a single policy, it will be applied to all specified domains. Visit the following link for more information about the DMARC record specification: https://dmarc.org/resources/specification/' examples: multiple: summary: To apply multiple DMARC policies, duplicate the policy arguments. value: policy="v=DMARC1; p=none;" policy="v=DMARC1; p=reject;" policy="v=DMARC1; p=quarantine;" single: summary: To apply a single DMARC record to domains, specify a single policy. value: policy="v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com" in: query name: policy required: true schema: type: string - description: "The domain for which to apply the DMARC record.\n\n**Note:**\n\n To apply multiple domain DMARC records, duplicate the parameter name. For example, use the `domain=example-1.com`, `domain=example-2.com`, and `domain=example-3.com` parameters.\n\n If you do not include this argument, the system applies the DMARC record to **all** domains on the system." examples: multiple: summary: To apply multiple DMARC records value: domain=example-1.com domain=example-2.com domain=example-3.com single: summary: To apply a single domain DMARC record value: example.com in: query name: domain required: false schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects that contains information about the DMARC records applied to domains. items: properties: domain: description: The domain for which the DMARC record was applied. example: example.com format: domain type: string msg: description: The domain's DMARC record status message. example: '[ADD:TXT@_dmarc.example.com:v=DMARC1; p=reject;]' type: string status: description: 'Whether the system applied a DMARC record to the domain. * `1` - The system applied a DMARC record. * `0` - The system did **not** apply a DMARC record.' enum: - 0 - 1 example: 1 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: apply_dmarc type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Apply a DMARC record to a domain tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n apply_dmarc \\\n domain='example.com' \\\n policy='v=DMARC1; p=reject;'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/apply_dmarc?api.version=1&domain=example.com&policy='v=DMARC1; p=reject;' x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '124' /block_incoming_email_from_country: get: description: This function blocks email from specific countries. operationId: Exim-block_incoming_email_from_country parameters: - description: "The country to block.\nThe [ISO 3166-1 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html) two-letter country code.\n\n**Warning:**\n\nDo **not** block the `ZZ` country code if the server uses a [NAT](https://docs.cpanel.net/knowledge-base/general-systems-administration/1-1-nat/) configuration.\n\n**Note:**\n\n * To search all available country codes, read the ISO's [Full list of Country Codes](https://www.iso.org/obp/ui) documentation.\n * To block multiple countries, duplicate or increment the parameter name. For example: `country_code-1`, `country_code-2`, and `country_code-3`." examples: multiple: summary: Multiple country codes. value: country_code-1=AA country_code-2=AB country_code-3=AC single: summary: A single country code. value: AA in: query name: country_code required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: updated: description: 'Whether the function blocked one or more countries. * `1` — Success. * `0` — Failure. **Note** The function returns `0` for the `updated` return if the server already blocks that country.' enum: - 0 - 1 example: 1 type: integer type: object metadata: properties: command: description: The method name called. example: block_incoming_email_from_country type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Add block on emails from specific countries tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n block_incoming_email_from_country \\\n country_code='AA'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/block_incoming_email_from_country?api.version=1&country_code=AA x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '84' /block_incoming_email_from_domain: get: description: This function blocks email from specific domains. operationId: Exim-block_incoming_email_from_domain parameters: - description: 'The domain to block. **Note:** * The function returns `0` for the `updated` return if the server already blocks that domain. * An FQDN requires **at least** [a label, a dot (`.`), and a top-level domain (TLD)](https://en.wikipedia.org/wiki/Domain_name#Domain_name_syntax). * Enter an asterisk (`*`) to represent [a wildcard label or TLD](https://en.wikipedia.org/wiki/Wildcard_DNS_record). * To block multiple domains, duplicate or increment the parameter name.' examples: multiple: summary: Multiple domains. value: domain=example.com domain-1=example1.com domain-2=example2.com multiple-alternative: summary: Multiple domains. value: domain=example.com domain=example1.com domain=example2.com single: summary: A single domain. value: example.com in: query name: domain required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: updated: description: 'Whether the function blocked one or more domains. * 1 — Success. * 0 — Failure.' enum: - 0 - 1 example: 1 type: integer type: object metadata: properties: command: description: The method name called. example: block_incoming_email_from_domain type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Add block on emails from specific domains tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n block_incoming_email_from_domain \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/block_incoming_email_from_domain?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '84' /disable_dkim: get: description: This function removes the DomainKeys Identified Mail (DKIM) records on the DNS server for one or more domains. operationId: EmailAuth-disable_dkim parameters: - description: "The domain for which to remove DKIM records on the DNS server.\n\n**Note:**\n\n To remove multiple domain DKIM records, duplicate the parameter name. For example, use the `domain=example-1.com`, `domain=example-2.com`, and `domain=example-3.com` parameters." examples: multiple: summary: To remove multiple domain DKIM records value: domain=example-1.com domain=example-2.com domain=example-3.com single: summary: To remove a single domain DKIM record value: example.com in: query name: domain required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects that contains information about the removal of a domain's DKIM record on the DNS server. items: properties: domain: description: The domain for which the system removed the DKIM record. example: example.com type: string msg: description: Information about the removed DKIM record. example: '[REMOVE:TXT@default._domainkey:v=DKIM1; k=rsa; p=MIGfMAOGCSqGSIb3DQEBAQUAA4GNADCBiLMNOpQDw5nw4NP1RsWXlfmiMzByDfOT16QCZO/xJtrPZKskZF8/sU0zWGTqKUOErlyJfoJzMDUv3/zzjGswc2nEmYqxxoQZaBkN4QaS6MvJQxysAr+sK8C248/r9zMperQdhJedUVejtpFQHJwgqpHy1tQMxY37L7sQjdxmQ5WnQ1acXiwIDAQAB;]' type: string status: description: 'Whether the system removed the domain''s DKIM record on the DNS server. - `1` — The system removed the domain''s DKIM record. - `0` — The system did *not* remove the domain''s DKIM record.' enum: - 0 - 1 example: 1 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: disable_dkim type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Disable domain's DKIM records tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n disable_dkim \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/disable_dkim?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' /disable_mail_sni: get: deprecated: true description: 'This function is deprecated and always fails. **Note:** Mail SNI is **always** enabled. cPanel & WHM no longer allows mail SNI to be disabled. * Functions that disable Mail SNI fail and make no changes. * Functions that enable Mail SNI succeed with a warning that Mail SNI is always enabled.' operationId: SSL-disable_mail_sni parameters: - description: 'The account''s domain. You may pass multiple domains using additional numbered parameters (e.g., `domain-1`, `domain-2`). **Note:** This parameter has no effect — this function always fails regardless of any input because mail SNI can no longer be disabled.' in: query name: domain required: false schema: example: example.com type: string responses: '200': content: application/json: schema: properties: data: properties: {} type: object metadata: properties: command: description: The method name called. example: disable_mail_sni type: string reason: description: The reason the API function failed. example: cPanel & WHM no longer allows mail SNI to be disabled. type: string result: description: 'This function always returns `0` (failure) because mail SNI can no longer be disabled. * `0` - Failed.' enum: - 0 example: 0 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: (Deprecated) Disable SNI mail services for domains tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n disable_mail_sni \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/disable_mail_sni?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.48' /emailtrack_search: get: description: 'This function retrieves email delivery records. **Warning:** * On most servers, this function returns a large amount of output. We **strongly** recommend that you filter and sort the output. * The following example uses the filter and sort options: `https://hostname.example.com:2087/cpsess##########/json-api/emailtrack_search?api.version=1&api.filter.enable=1&api.filter.a.field=sendunixtime&api.filter.a.arg0=1628889719&api.filter.a.type=gt&api.filter.b.field=sendunixtime&api.filter.b.arg0=1629847321&api.filter.b.type=lt&api.sort.enable=1&api.sort.a.field=sendunixtime&api.sort.a.reverse=0&api.chunk.enable=1&api.chunk.size=25&api.chunk.start=1&success=1`' operationId: Exim-emailtrack_search parameters: - description: 'Whether to return delivery deferral events. * `1` — Return delivery deferral events. * `0` — Do not return delivery deferral events.' in: query name: defer required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: 'The type of delivery records to retrieve. * `all` — Retrieve all delivery records. * `remote` — Retrieve remote delivery records. * `local` — Retrieve local delivery records.' in: query name: deliverytype required: false schema: default: all enum: - all - remote - local example: all type: string - description: 'Whether to return delivery failure events. * `1` — Return delivery failure events. * `0` — Do not return delivery failure events.' in: query name: failure required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: 'Whether to return delivery attempts in progress. * `1` — Return delivery attempts in progress. * `0` — Do not return delivery attempts in progress.' in: query name: inprogress required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: 'The number of results to return for each type. **Note** If you set this parameter to `0`, the function returns unlimited results.' in: query name: max_results_by_type required: false schema: default: 0 example: 3 type: integer - description: 'Whether to return successful delivery attempts. * `1` — Return successful delivery attempts. * `0` — Do not return successful delivery attempts.' in: query name: success required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer responses: '200': content: application/json: schema: properties: data: properties: records: description: An array of objects containing the delivery record. items: properties: actiontime: description: When the delivery attempt happened in `YYYY-MM-DD HH-mm-SS` format. example: '2012-02-06T14:17:51.000Z' type: string actionunixtime: description: When the delivery attempt happened. example: 1328559471 format: unix_timestamp type: integer deliveredto: description: "The delivery attempt's final end point.\n\n**Note:**\n\n If the message went to a mailing list, the address will be the mailing list member's address." example: null type: - string - 'null' deliverydomain: description: The recipient's domain. example: null format: domain type: - string - 'null' deliveryuser: description: The recipient's username. example: null type: - string - 'null' domain: description: The sender's domain. example: example.com format: domain type: string host: description: The hostname that received the message. example: null format: hostname type: - string - 'null' ip: description: The recipient's IP address. example: null format: ipv4 type: - string - 'null' message: description: The action taken. example: Domain example.com has exceeded the max defers and failures per hour (5/5 (100%)) allowed. Message discarded. type: string msgid: description: The message ID. example: 1RuV0Z-0005NR-BN type: string recipient: description: The recipient's mail address. example: user@example.com format: email type: string router: description: The mail server's internal router name. example: enforce_mail_permissions type: string sender: description: The sender's full email address. example: user@example.com type: string senderauth: description: The user authentication. example: localuser format: hostname type: string senderhost: description: The sender's hostname. example: localhost format: hostname type: string senderip: description: The sender's IP address. example: 127.0.0.1 type: string sendunixtime: description: When the message was sent. example: 1328559471 format: unix_timestamp type: integer size: description: The message's size. example: 1653 format: bytes minimum: 1 type: integer spamscore: description: 'The message''s spam score. **Note:** If the spam prevention engine uses a result range from `0` to `1` , the system multiplies the result by `10`.' example: 5 minimum: 0 type: integer transport: description: The mail transfer agent (MTA). example: null type: - string - 'null' transport_is_remote: description: 'Whether the mail transfer agent (MTA) is remote. * `1` — Remote. * `0` — Not remote.' enum: - 0 - 1 example: 0 type: integer type: description: 'The delivery status. * `success` * `defer` * `failure` * `inprogress`' enum: - success - defer - failure - inprogress example: success type: string user: description: The sender's username. example: cpanel1 type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: emailtrack_search type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success * `0` — Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return email delivery records by search criteria tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n emailtrack_search\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/emailtrack_search?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' /emailtrack_stats: get: description: This function retrieves email tracking statistics. operationId: Exim-emailtrack_stats parameters: - description: 'The type of delivery to query. If you do not specify a value, this function returns all types. * `remote` * `remote-or-faildefer` * `local`' in: query name: deliverytype required: false schema: enum: - remote - remote-or-faildefer - local example: remote type: string - description: 'The end date of the search window. This parameter defaults to the current time. **Note** This parameter is an alias for `endtime` and is provided for backwards compatibility.' in: query name: enddate required: false schema: example: 1471552781 format: unix_timestamp type: integer - description: 'The end time of the search window. This parameter defaults to the current time. **Note** You can also call this the `enddate` parameter.' in: query name: endtime required: false schema: example: 1471552781 format: unix_timestamp type: integer - description: 'Whether to return the `TOTALSIZE` parameter. * 1 — Do **not** return. * 0 — Return.' in: query name: nosize required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: 'Whether to return the `SUCCESSCOUNT` parameter. * 1 — Do **not** return. * 0 — Return.' in: query name: nosuccess required: false schema: default: 0 enum: - 0 - 1 example: 0 type: integer - description: 'The start date of the search window. **Note** This parameter is an alias for `starttime` and is provided for backwards compatibility.' in: query name: startdate required: false schema: default: 0 example: 1371552781 format: unix_timestamp type: integer - description: 'The start time of the search window. **Note** You can also call this the `startdate` parameter.' in: query name: starttime required: false schema: default: 0 example: 1371552781 format: unix_timestamp type: integer - description: The cPanel username to query. If you do not specify a value, the function retrieves statistics for all of the server's accounts. in: query name: user required: false schema: example: username type: string responses: '200': content: application/json: schema: properties: data: properties: records: description: An array of objects containing the message information. items: properties: DEFERCOUNT: description: The number of deferral events. example: 0 minimum: 0 type: integer DEFERFAILCOUNT: description: The number of messages that the system deferred and failed to deliver. example: 0 minimum: 0 type: integer FAILCOUNT: description: "The number of delivery failures.\n\n**Note:**\n\n If a message has three recipients, it can have a total of three failed deliveries." example: 0 minimum: 0 type: integer INPROGRESSCOUNT: description: The number of messages currently in progress. example: 0 minimum: 0 type: integer SENDCOUNT: description: The number of sent messages. example: 14 minimum: 0 type: integer SUCCESSCOUNT: description: "The number of successful deliveries.\n\n**Note:**\n\n If a message has three recipients, it can have a total of three successful deliveries." example: 14 type: integer TOTALSIZE: description: The total size of messages that the server sent. example: 27444 format: bytes minimum: 0 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: emailtrack_stats type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return cPanel account email tracking statistics tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n emailtrack_stats\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/emailtrack_stats?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' /emailtrack_user_stats: get: description: This function retrieves email tracking statistics for each user. operationId: Exim-emailtrack_user_stats parameters: - description: 'The type of delivery to query. If you do not specify a value, this function returns all types. * `remote` * `remote-or-faildefer` * `local`' in: query name: deliverytype required: false schema: enum: - remote - remote-or-faildefer - local example: remote type: string - description: The end time of the search window. in: query name: endtime required: false schema: example: 1471552781 format: unix_timestamp type: integer - description: The sender's email address. If you do not specify a value, this function returns entries for mail from all senders. in: query name: sender required: false schema: example: username@example.com format: email type: string - description: The start time of the search window. in: query name: starttime required: false schema: default: 0 example: 1371552781 format: unix_timestamp type: integer responses: '200': content: application/json: schema: properties: data: properties: records: description: An array of objects containing the message information. items: properties: DEFERCOUNT: description: The number of deferral events. example: 0 minimum: 0 type: integer DEFERFAILCOUNT: description: The number of messages that the system deferred and failed to deliver. example: 0 minimum: 0 type: integer DOMAIN: description: The mailbox's domain. example: example.com format: domain type: string FAILCOUNT: description: "The number of delivery failures.\n\n**Note:**\n\n If you assign a message three recipients, the system can fail to deliver the message three times." example: 0 minimum: 0 type: integer OWNER: description: The mailbox's account owner. example: root type: string PRIMARY_DOMAIN: description: The mailbox account's primary domain. example: example.com format: domain type: string REACHED_MAXDEFERFAIL: description: 'Whether the mailbox reached the maximum number of failed deferred messages. * `1` — Reached. * `0` — Has **not** reached.' enum: - 0 - 1 example: 1 type: integer REACHED_MAXEMAILS: description: 'Whether the mailbox has reached the maximum number of messages allowed per hour. * `1` — Reached. * `0` — Has **not** reached.' enum: - 0 - 1 example: 1 type: integer SENDCOUNT: description: The number of sent messages. example: 14 minimum: 0 type: integer SUCCESSCOUNT: description: "The number of successful deliveries.\n\n**Note:**\n\n If you assign a message three recipients, the system can successfully deliver the message three times." example: 14 minimum: 0 type: integer TOTALSIZE: description: The total size of messages sent by the server. example: 27444 format: bytes type: integer USER: description: The mailbox's owner. example: example type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: emailtrack_user_stats type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success * `0` — Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return all cPanel accounts email tracking statistics tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n emailtrack_user_stats\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/emailtrack_user_stats?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' /enable_dkim: get: description: This function enables DomainKeys Identified Mail (DKIM) records on the DNS server for one or more domains. operationId: EmailAuth-enable_dkim parameters: - description: "The domain for which to enable DKIM records on the DNS server.\n\n**Note:**\n\n To enable multiple domain DKIM records, duplicate the parameter name. For example, use the `domain=example-1.com`, `domain=example-2.com`, and `domain=example-3.com parameters`." examples: multiple: summary: To enable multiple domain DKIM records value: domain=example-1.com domain=example-2.com domain=example-3.com single: summary: To enable a single domain DKIM record value: example.com in: query name: domain required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects containing information about the enabled state of a domain's DKIM records on the DNS server. items: properties: domain: description: The domain for which the system enabled the DKIM record. example: example.com format: domain type: string msg: description: The domain's DKIM record status message. example: Installed Keys type: string status: description: 'Whether the system enabled the domain''s DKIM record on the DNS server. * `1` — The system enabled the domain''s DKIM record. * `0` — The system did **not** enable the domain''s DKIM record.' enum: - 0 - 1 example: 1 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: enable_dkim type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Enable domain's DKIM records tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n enable_dkim \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/enable_dkim?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' /enable_mail_sni: get: description: 'This function enables SNI for mail services on the specified domains. **Note:** Mail SNI is **always** enabled. * Functions that enable Mail SNI succeed with a warning that Mail SNI is always enabled. * Functions that disable Mail SNI fail and make no changes.' operationId: SSL-enable_mail_sni parameters: - description: The account's domain. You may pass multiple domains using additional numbered parameters (e.g., `domain-1`, `domain-2`). in: query name: domain required: true schema: example: example.com type: string responses: '200': content: application/json: schema: properties: data: properties: failed_domains: additionalProperties: description: 'The reason the domain failed to enable mail SNI. **Note:** The domain name is the return key.' type: string description: 'An object containing the domains that failed to enable mail SNI. **Note:** This object only includes domains that you do not own.' type: object updated_domains: description: 'An object containing the domains with updated mail SNI status. **Note:** This object is always empty. Mail SNI is always enabled, and this function makes no changes.' example: {} type: object type: object metadata: properties: command: description: The method name called. example: enable_mail_sni type: string reason: description: 'The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.' example: OK type: string result: description: '* `1` - Success * `0` - Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer warnings: description: Warnings generated while running the function. items: example: Mail SNI is always enabled now. type: string type: array type: object description: HTTP Request was successful. summary: Enable SNI mail services for domains tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n enable_mail_sni \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/enable_mail_sni?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.48' /ensure_dkim_keys_exist: get: description: 'This function confirms the validity of a DomainKeys Identified Mail (DKIM) key for one or more domains. **Note:** * If an existing DKIM key does **not** meet the server''s security requirements, the system replaces the existing DKIM key. * If no DKIM key exists, the system creates a new key for the domain.' operationId: EmailAuth-ensure_dkim_keys_exist parameters: - description: 'The domain for which to confirm a valid DKIM key exists. **Note:** To check the DKIM key validity for multiple domain, duplicate the parameter name. For example, use the `domain-1=example.com`, `domain-2=example2.com`, and `domain-3=example3.com` parameters.' examples: multiple: summary: Check the DKIM key validity for multiple domains. value: domain=example1.com&domain=example2.com&domain=example3.com single: summary: Check the DKIM key validity for a single domain. value: example.com in: query name: domain required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects containing information about the domain's DKIM key validity. items: properties: domain: description: The domain for which the system confirmed that a valid DKIM key exists. example: example.com format: domain type: string msg: description: The domain's DKIM key status message. example: created new key type: string status: description: 'Whether the system verified that the domain''s DKIM key exists. * `1` — The system verified the existence of the domain''s DKIM key. * `0` — The system did **not** verify the existence of the domain''s DKIM key.' enum: - 0 - 1 example: 1 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: ensure_dkim_keys_exist type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed: Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Validate domain's DKIM keys tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n ensure_dkim_keys_exist \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/ensure_dkim_keys_exist?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' /exim_configuration_check: get: description: This function scans the Exim configuration file for errors, and if it finds errors attempts to repair them. operationId: Exim-exim_configuration_check parameters: [] responses: '200': content: application/json: schema: properties: data: properties: message: description: "The reason why the configuration check failed.\n\n**Note:**\n\n The function **only** returns this parameter if the configuration file contains errors." example: "cPanel was unable to automatically merge your Exim configuration with the new settings that shipped\nwith the build you have installed (11.38.0 (build 9999)) because you have a custom or broken configuration which\ncannot be automatically configured.\n Since this configuration update is not critical, we left your previous configuration intact until\nthe new configuration can be properly installed. In order to complete this configuration update, you will \nneed to manually merge your configuration with the new configuration settings.\n\n\nPlease follow the steps below to complete this update:\n\n\t1. Backup your existing configuration\n\t2. Notate any custom changes you have made in the ACL section in the 'Advanced Editor Tab'.\n\t3. Choose 'Reset cPanel & WHM Exim configuration files, one option at a time, until the installed Exim configuration is valid' under the 'Reset Tab'.\n\t4. Reinstall your customizations in the 'Advanced Editor Tab'.\n\n\nCurrent Config Version: 10.320000\nNew Config Version: 10.330000" type: string type: object metadata: properties: command: description: The method name called. example: exim_configuration_check type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: Configuration Update Failed type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Repair Exim configuration file tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n exim_configuration_check\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/exim_configuration_check?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' /expunge_mailbox_messages: get: description: 'This function removes mail messages from a cPanel account that you select with a query. **Important:** When you disable the Receive Mail role, the system **disables** this function.' operationId: Mailboxes-expunge_mailbox_messages parameters: - description: An email account that exists on the server. in: query name: account required: true schema: example: user@example.com format: email type: string - description: "A mailbox name on the account.\n\n**Note:**\n\n Because you cannot escape wildcard characters such as (`*`), we recommend that you use functions that use the `mailbox_guid` parameter instead. For example, the WHM API 1 `expunge_messages_for_mailbox_guid` function." in: query name: mailbox required: true schema: example: INBOX type: string - description: A [Dovecot search query](http://wiki2.dovecot.org/Tools/Doveadm/SearchQuery) to select which messages you wish to remove from the mailbox. in: query name: query required: true schema: example: savedbefore 52w type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: expunge_mailbox_messages type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` - Success * `0` - Failed. Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Remove email account messages by Dovecot query tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n expunge_mailbox_messages \\\n account='user@example.com' \\\n mailbox='INBOX' \\\n query='savedbefore 52w'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/expunge_mailbox_messages?api.version=1&account=user%40example.com&mailbox=INBOX&query=savedbefore%2052w x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '58' /expunge_messages_for_mailbox_guid: get: description: 'This function removes mail messages from a cPanel account. **Important:** When you disable the Receive Mail role, the system **disables** this function.' operationId: Mailboxes-expunge_messages_for_mailbox_guid parameters: - description: The email account's name. in: query name: account required: true schema: example: user@example.com type: string - description: 'The mailbox''s globally unique identifier (GUID). **Note:** To find the mailbox GUID, use the WHM API 1 - `get_mailbox_status` function.' in: query name: mailbox_guid required: true schema: example: 2550860f0c58d158c92a000044f0d230 type: string - description: The Dovecot search query to select which messages you wish to remove from the mailbox. For more information, read [Dovecot's Search Query](http://wiki2.dovecot.org/Tools/Doveadm/SearchQuery) documentation. in: query name: query required: true schema: example: savedbefore 52w type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: expunge_messages_for_mailbox_guid type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` - Success * `0` - Failed. Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Remove email account messages by mailbox GUID tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n expunge_messages_for_mailbox_guid \\\n account='user@example.com' \\\n mailbox_guid='2550860f0c58d158c92a000044f0d230' \\\n query='savedbefore 52w'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/expunge_messages_for_mailbox_guid?api.version=1&account=user%40example.com&mailbox_guid=2550860f0c58d158c92a000044f0d230&query=savedbefore%2052w x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '64' /fetch_dkim_private_keys: get: description: 'This function returns a domain''s installed DKIM private key in Privacy-Enhanced Mail (PEM) format. **Warning:** We **strongly** recommend that you protect your private key. If others obtain your private DKIM key, they could sign emails and impersonate you as a sender.' operationId: EmailAuth-fetch_dkim_private_keys parameters: - description: "The queried domain.\n\n**Note:**\n\n To retrieve multiple domain DKIM keys, increment the parameter name. For example, use the `domain-1=example-1.com`, `domain-2=example-2.com`, and `domain-3=example-3.com` parameters." examples: multiple: summary: Query multiple domains. value: domain=example-1.com&domain=example-2.com&domain=example-3.com single: summary: Query a single domain. value: example.com in: query name: domain required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array containing information about the domain's DKIM private key. items: properties: domain: description: The queried domain. example: example.com type: string pem: description: The domain's DKIM private key, in PEM format. example: REDACTED_PRIVATE_KEY_EXAMPLE type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: fetch_dkim_private_keys type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return domain's DKIM private key tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n fetch_dkim_private_keys \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/fetch_dkim_private_keys?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' /fetch_mail_queue: get: description: This function retrieves the contents of the server's mail queue. operationId: Exim-fetch_mail_queue parameters: [] responses: '200': content: application/json: schema: properties: data: properties: records: description: An array of objects that contain of the message information. items: properties: frozen: description: 'Whether the mail message is frozen. * `1` — Frozen. * `0` — **Not** frozen.' enum: - 0 - 1 example: 0 type: integer msgid: description: The mail message's ID. example: 1UotX3-0002HX-Lr type: string recipients: description: An array of the mail message's recipients. items: example: pricilla@graceland.com format: email type: string type: array sender: description: The mail message's sender. example: elvis@graceland.com format: email type: string size: description: The mail message's size in bytes. example: 14336 format: bytes minimum: 0 type: integer time: description: The mail message's timestamp. example: 1371552781 format: unix_timestamp type: integer user: description: The mail message's owner. example: null type: - string - 'null' type: object type: array type: object metadata: properties: command: description: The method name called. example: fetch_mail_queue type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return server mail queue contents tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n fetch_mail_queue\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/fetch_mail_queue?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' /generate_mobileconfig: get: description: 'This function generates a mobile configuration profile for an email account. **Important:** When you disable the *Receive Mail* role, the system **disables** this function.' operationId: Email-generate_mobileconfig parameters: - description: The email account's username. in: query name: account required: true schema: example: username type: string - description: 'Whether to use an SSL-encrypted connection. * `1` — Use an SSL-encrypted connnection. * `0` — Do **not** use an SSL-encrypted connection.' in: query name: use_ssl required: true schema: enum: - 0 - 1 example: 1 type: integer - description: "A comma-separated list of the email account service's `.mobileconfig` file names.\n* `caldav` — The `.mobileconfig` file for calendar setup.\n* `carddav` — The `.mobileconfig` file for contacts setup.\n* `email` — The `.mobileconfig` file for email setup.\n\n**Note:**\n\n * If you don't specify a value, this parameter uses the default values.\n * You can request one, two, or all possible values.\n * The function ignores unsupported values." in: query name: selected_account_services required: false schema: default: email,caldav,carddav enum: - caldav - carddav - email example: email type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: The function's raw output. This function returns this value as a binary of an Apple mobile configuration file containing a series of sub-tags and keys. For more information, read [Apple's key reference](https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf). example: 'MIIcIwYJKoZIhvcNAQcCoIIcFDCCHBACAQExDzANBglghkgBZQMEAgEFADCCFS4GCSqGSIb3DQEH AaCCFR8EghUbPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhRE9DVFlQ RSBwbGlzdCBQVUJMSUMgIi0vL0FwcGxlLy9EVEQgUExJU1QgMS4wLy9FTiIgImh0dHA6Ly93d3cu YXBwbGUuY29tL0RURHMvUHJvcGVydHlMaXN0LTEuMC5kdGQiPg0KPHBsaXN0IHZlcnNpb249IjEu MCI+DQo8ZGljdD4NCiAgPGtleT5QYXlsb2FkQ29udGVudDwva2V5Pg0KICA8YXJyYXk+DQogICAg PGRpY3Q+DQogICAgICAgIDxrZXk+Q2FsREFWQWNjb3VudERlc2NyaXB0aW9uPC9rZXk+DQogICAg ICAgIDxzdHJpbmc+dXNlcm5hbWVAaG9zdC0xNzItMTYtMS0xMS5hc2hsZXk4MnNiLnRsZDwvc3Ry aW5nPg0KICAgICAgICA8a2V5PkNhbERBVkhvc3ROYW1lPC9rZXk+DQogICAg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ZIhvcNAwICASgwDQYJKoZIhvcNAQEBBQAEggEACr8R Pbw5CymW4Eep61SNsQzH54LXWbaS68mxF+Z8roOSLZTVYhBKP14bGJcUMhsS7c8zGYlOdwXWTA87 4VQ0O4WIoWOsydxLVgHJ52ZDstN2iXsuW56Cm/Mk7Zow1MFdCJJ/ZX/oKOpnzm/t38kSvTXYyT/X LxGnTUYt+QbgUrqrxYZMbZeaAvGXkFTjTSi1kklZdnd7ndvashv5OhQ6zf6y831/c2M7mrn8vJKv e44Inb5NRBoK0MAc3f0vmAXrF087ayyNy6E1DqpdPWAGpCKYfIzWtIccrxKcguoIM4mWZ/Lp6mrZ I/2K6npCz9Wlm7iYASSsP3NMO8JWk7EWPA== ' format: base64 type: string type: object metadata: properties: command: description: The method name called. example: generate_mobileconfig type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Create email account mobile profile configuration tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n generate_mobileconfig \\\n account='username' \\\n use_ssl='1'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/generate_mobileconfig?api.version=1&account=username&use_ssl=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.52' /get_default_dmarc_record: get: description: 'This function retrieves the server''s default DMARC record. The system uses the default DMARC record when creating new accounts or applying DMARC policies that don''t specify a custom record.' operationId: EmailAuth-get_default_dmarc_record parameters: [] responses: '200': content: application/json: schema: properties: data: properties: payload: description: An object that contains the server's default DMARC record. properties: record: description: The server's default DMARC record string. example: v=DMARC1; p=none; type: string type: object type: object metadata: properties: command: description: The method name called. example: get_default_dmarc_record type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Get the server's default DMARC record tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n get_default_dmarc_record\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/get_default_dmarc_record?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '124' /get_mailbox_status: get: description: 'This function lists the status of a cPanel''s mail account''s mailboxes. **Important:** When you disable the *Receive Mail* role, the system **disables** this function.' operationId: Mailboxes-get_mailbox_status parameters: - description: 'An email account or cPanel account''s username. **Note:** `_mainaccount` is an alias representing the cPanel user''s mailbox (for example, `_mainaccount@example.com represents the example mailbox.)' in: query name: account required: true schema: example: user@example.com oneOf: - format: email type: string - format: username type: string responses: '200': content: application/json: schema: properties: data: additionalProperties: description: 'An object containing information about the mailbox''s contents. **Note:** The mailbox name is the return''s name.' properties: guid: description: The mailbox globally unique identifier (GUID). example: 1234560f0c58d158c92a000044f0d230 type: string messages: description: The total number of messages in the mailbox. example: 0 minimum: 0 type: integer vsize: description: The total virtual size of the mailbox's contents with `CRLF` line terminators. example: 0 format: bytes minimum: 0 type: integer type: object example: INBOX: guid: 111111234560f0c58d158c92a000044f messages: 42000 vsize: 42 INBOX.Drafts: guid: 11111111234560f0c58d158c92a00000 messages: 5 vsize: 522 INBOX.Sent: guid: 1111111234560f0c58d158c92a000004 messages: 1 vsize: 56 INBOX.Trash: guid: 1111234560f0c58d158c92a000044f0d messages: 2001 vsize: 5643 INBOX.angel_face@example_com: guid: 11234560f0c58d158c92a000044f0d23 messages: 3 vsize: 1524 INBOX.marla_singer@example_com: guid: 1234560f0c58d158c92a000044f0d230 messages: 5 vsize: 100 INBOX.narrator@example_com: guid: 11111234560f0c58d158c92a000044f0 messages: 0 vsize: 0 INBOX.robert_paulsen@example_com: guid: 111111111234560f0c58d158c92a0001 messages: 2 vsize: 2222 INBOX.tyler_durden@example_com: guid: 111234560f0c58d158c92a000044f0d2 messages: 55 vsize: 12244 type: object metadata: properties: command: description: The method name called. example: get_mailbox_status type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return cPanel account mailboxes status by name tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n get_mailbox_status \\\n account='user@example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/get_mailbox_status?api.version=1&account=user%40example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '58' /get_mailbox_status_list: get: description: 'This function lists the status of a cPanel''s mail account''s mailboxes. **Important:** When you disable the Receive Mail role, the system **disables** this function.' operationId: Mailboxes-get_mailbox_status_list parameters: - description: The email account's name. example: user@example.com in: query name: account required: true schema: anyOf: - description: A valid email account that exists on the server example: user@example.com format: email type: string - description: The cPanel user's account name. example: example format: username type: string - description: An alias that represents the cPanel user's mailbox example: _mainaccount@example.com format: email type: string type: string responses: '200': content: application/json: schema: properties: data: properties: mailboxes: description: An array that contains information about the mailbox's contents. items: properties: guid: description: The alpha-numeric 32-byte mailbox GUID. example: 1234560f0c58d158c92a000044f0d230 type: string mailbox: description: The mailbox name. example: INBOX.marla_singer@example_com type: string messages: description: The total number of messages in the mailbox. example: 0 minimum: 0 type: integer vsize: description: The total virtual size of the mailbox's contents, computed with CRLF line terminators. example: 0 format: bytes minimum: 0 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: get_mailbox_status_list type: string reason: description: The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` - Success * `0` - Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return cPanel account mailboxes status list tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n get_mailbox_status_list \\\n account='user@example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/get_mailbox_status_list?api.version=1&account=user%40example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '64' /get_unique_recipient_count_per_sender_for_user: get: description: This function gets the number of unique recipients that a system user sent mail to within a period of time. It groups this data by each of the user's email accounts. operationId: Exim-get_unique_recipient_count_per_sender_for_user parameters: - description: An end time to query. in: query name: end_time required: true schema: example: 1550923200 format: unix_timestamp type: integer - description: A start time to query. in: query name: start_time required: true schema: example: 1550872800 format: unix_timestamp type: integer - description: The system user's username. in: query name: user required: true schema: example: username type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects that contain a count of the number of unique recipients a system user sent mail to. items: properties: sender: description: The user's email address. example: username@example.com type: string unique_recipient_count: description: The number of unique recipients that the email account sent mail to. example: 51 minimum: 1 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: get_unique_recipient_count_per_sender_for_user type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return cPanel account unique email recipients tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n get_unique_recipient_count_per_sender_for_user \\\n user='username' \\\n start_time='1550872800' \\\n end_time='1550923200'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/get_unique_recipient_count_per_sender_for_user?api.version=1&user=username&start_time=1550872800&end_time=1550923200 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '80' /get_unique_sender_recipient_count_per_user: get: description: This function gets a count of the email addresses that each system account sent mail to within a specific period of time. It groups the data by each system user for all the system's users. operationId: Exim-get_unique_sender_recipient_count_per_user parameters: - description: An end time to query. in: query name: end_time required: true schema: example: 1551192100 format: unix_timestamp type: integer - description: A start time to query. in: query name: start_time required: true schema: example: 1550702383 format: unix_timestamp type: integer responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects that contain a count for all system users' unique email recipients. items: properties: unique_sender_recipient_count: description: A count of the unique sender-recipient pairs for mail sent during a period of time. example: 120 minimum: 1 type: integer user: description: A system user's username. example: username type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: get_unique_sender_recipient_count_per_user type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return all cPanel account unique email recipients tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n get_unique_sender_recipient_count_per_user \\\n start_time='1550702383' \\\n end_time='1551192100'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/get_unique_sender_recipient_count_per_user?api.version=1&start_time=1550702383&end_time=1551192100 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '80' /get_user_email_forward_destination: get: description: 'This function retrieves the destination to which the system forwards a system account''s email. **Note:** * Usually, the system sends notices about the server''s problems and activity to the `root` account. * If you do **not** use the `suexec` module, the `nobody` user receives bounce messages from email that CGI scripts send.' operationId: Email-get_user_email_forward_destination parameters: - description: The system account name. in: query name: user required: true schema: example: root type: string responses: '200': content: application/json: schema: properties: data: properties: forward_to: description: The system accounts or email addresses to which the system forwards the account's email. items: example: user@example.com type: string type: array type: object metadata: properties: command: description: The method name called. example: get_user_email_forward_destination type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return cPanel account forward destination tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n get_user_email_forward_destination \\\n user='root'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/get_user_email_forward_destination?api.version=1&user=root x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.52' /hold_outgoing_email: get: description: 'This function sets Exim''s queue to hold email that a user sends to an external address. **Note:** If mail for a cPanel user''s account is suspended, the system will reject their email before the mail server puts it in the queue.' operationId: Accounts-hold_outgoing_email parameters: - description: 'The cPanel account. **Note** You **cannot** suspend the root user''s outgoing email with this function.' in: query name: user required: true schema: example: example type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: hold_outgoing_email type: string reason: description: The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` - Success * `0` - Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Add cPanel account to outbound email hold queue tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n hold_outgoing_email \\\n user='example'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/hold_outgoing_email?api.version=1&user=example x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '56' /install_dkim_private_keys: get: description: 'This function installs existing keys for use in a DomainKeys Identified Mail (DKIM) record. This is useful if you do not want the system to generate keys for DKIM records. **Notes:** * This function does **not** update the local DNS server''s records. * If the local DNS server is authoritative for the domain''s DNS records, use the WHM API 1 `enable_dkim` function to update the local DNS server''s DNS records. * We recommend that you use the WHM API 1 `install_dkim_private_keys` and `enable_dkim` functions in a batch WHM API 1 call.' operationId: EmailAuth-install_dkim_private_keys parameters: - description: 'The domain for which to install an RSA private key to the local server''s DKIM record. **Note:** To install RSA private keys for multiple domains, increment the parameter name. For example, use the `domain-1=example-1.com`, `domain-2=example-2.com`, and `domain-3=example-3.com` parameters.' examples: multiple: summary: The domains for which to install an RSA private key to the local server's DKIM record. value: domain-1=example-1.com&domain-2=example-2.com&domain-3=example-3.com single: summary: The domain for which to install an RSA private key to the local server's DKIM record. value: example.com in: query name: domain required: true schema: format: domain type: string - description: "An RSA key in [Privacy-Enhanced Mail (PEM)](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.\n\n**Note:**\n\n * You **must** provide this parameter for each `domain` parameter.\n * To install multiple RSA keys for a domain, increment the parameter name. For example, use the `key-1`, `key-2` parameters.\nexamples:\n single:\n summary: An RSA key in [Privacy-Enhanced Mail (PEM)](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.\n value: key\n multiple:\n summary: RSA keys in [Privacy-Enhanced Mail (PEM)](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format.\n value: key-1=KEYKEYKEY&key-2=KEYKEYKEY" in: query name: key required: true schema: example: AAAAB3NzaC1yc2EAAAABIwAAAQEA5kSivOqhs0U9ZMN20nxFe27QZ3t0lT2zbH7OSXylKd1rjAjYXGnSXC9j2uaZlemHlptBKVziMJC86ha7Hcj6dVOVrDQ6vF4q34bOCjtKLphQ0IjBzVIvqILH9eLJdRaOrS34CmgmPaisrCk5wKVlakygvUfcj3HzaTKS6THyZDGx5shdTpa9lby8tpOD3JceV7ay4w8r0DipoKPC0OLpvS4EABEeMo9sx8zQEaKv03XygjNCCYtFvxlQQIRGlVoL7mPaHSaL3anI05RpNbm/PS+9BhZg+BqNjU4ofHBbfkXk5MiN6M7ieR4Sk5BquccboGF13U5slNgmCEekdt0amw type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects containing information about the RSA private key installation to the local server's DKIM record. items: properties: domain: description: The RSA private key's associated domain. example: example.com format: domain type: string msg: description: The RSA private key's installation status message. example: Installed Keys type: string status: description: 'Whether the system installed the RSA private key to the local server''s DKIM record. * `1` — The system installed the RSA private key. * `0` — The system **cannot** install the RSA private key.' enum: - 0 - 1 example: 1 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: install_dkim_private_keys type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Install existing private key to DKIM record tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n install_dkim_private_keys \\\n domain='example.com' \\\n key='AAAAB3NzaC1yc2EAAAABIwAAAQEA5kSivOqhs0U9ZMN20nxFe27QZ3t0lT2zbH7OSXylKd1rjAjYXGnSXC9j2uaZlemHlptBKVziMJC86ha7Hcj6dVOVrDQ6vF4q34bOCjtKLphQ0IjBzVIvqILH9eLJdRaOrS34CmgmPaisrCk5wKVlakygvUfcj3HzaTKS6THyZDGx5shdTpa9lby8tpOD3JceV7ay4w8r0DipoKPC0OLpvS4EABEeMo9sx8zQEaKv03XygjNCCYtFvxlQQIRGlVoL7mPaHSaL3anI05RpNbm/PS+9BhZg+BqNjU4ofHBbfkXk5MiN6M7ieR4Sk5BquccboGF13U5slNgmCEekdt0amw'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/install_dkim_private_keys?api.version=1&domain=example.com&key=AAAAB3NzaC1yc2EAAAABIwAAAQEA5kSivOqhs0U9ZMN20nxFe27QZ3t0lT2zbH7OSXylKd1rjAjYXGnSXC9j2uaZlemHlptBKVziMJC86ha7Hcj6dVOVrDQ6vF4q34bOCjtKLphQ0IjBzVIvqILH9eLJdRaOrS34CmgmPaisrCk5wKVlakygvUfcj3HzaTKS6THyZDGx5shdTpa9lby8tpOD3JceV7ay4w8r0DipoKPC0OLpvS4EABEeMo9sx8zQEaKv03XygjNCCYtFvxlQQIRGlVoL7mPaHSaL3anI05RpNbm%2fPS%2b9BhZg%2bBqNjU4ofHBbfkXk5MiN6M7ieR4Sk5BquccboGF13U5slNgmCEekdt0amw x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' /install_spf_records: get: description: This function installs a Sender Policy Framework (SPF) record for a domain on the DNS server. operationId: EmailAuth-install_spf_records parameters: - description: 'The domain for which to install an SPF record on the DNS server. **Note:** To install multiple SPF records, increment the parameter name. For example, use the `domain-1=example-1.com`, `domain-2=example-2.com`, and `domain-3=example3.com` parameters.' examples: multiple: summary: Multiple domains value: domain-1=example-1.com&domain-2=example-2.com&domain-3=example-3.com single: summary: Single domain value: example.com in: query name: domain required: true schema: example: example.com format: domain type: string - description: 'An SPF record. You **must** provide this parameter for every `domain` parameter.' in: query name: record required: true schema: example: v%3Dspf1%20%2Bip4%3A1192.0.2.0%20-all type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects containing information about the domain's SPF record installation to the DNS server. items: properties: domain: description: The SPF record's associated domain on the DNS server. example: example.com format: domain type: string msg: description: The SPF record's installation status to the DNS server. example: '[REPLACE:TXT@example.com.:v=spf1 ip4:192.0.2.0 -all]' type: string status: description: 'Whether the system installed the SPF record to the DNS server. * `1` — The system installed the SPF record on the DNS server. * `0` — The system **cannot** install the SPF record on the DNS server.' enum: - 0 - 1 example: 1 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: install_spf_records type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Install domain SPF record tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n install_spf_records \\\n domain='example.com' \\\n record='v%3Dspf1%20%2Bip4%3A1192.0.2.0%20-all'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/install_spf_records?api.version=1&domain=example.com&record=v%253Dspf1%2520%252Bip4%253A1192.0.2.0%2520-all x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' /is_sni_supported: get: description: 'This function checks whether the server supports SNI (Server Name Indication). **Note:** * Functions that enable Mail SNI succeed with a warning that Mail SNI is always enabled. * Functions that disable Mail SNI fail and make no changes.' operationId: SSL-is_sni_supported parameters: [] responses: '200': content: application/json: schema: properties: data: properties: sni: description: 'Whether the server supports SNI. - `1` — SNI supported. - `0` — SNI **not** supported.' enum: - 0 - 1 example: 1 type: integer type: object metadata: properties: command: description: The method name called. example: is_sni_supported type: string reason: description: 'The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.' example: OK type: string result: description: '* `1` - Success * `0` - Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return server SNI support status tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n is_sni_supported\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/is_sni_supported?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.40' /list_blocked_incoming_email_countries: get: description: This function lists which countries cannot send email to the server. operationId: Exim-list_blocked_incoming_email_countries parameters: [] responses: '200': content: application/json: schema: properties: data: properties: countries: description: An array of objects that contain each blocked country. items: properties: country_code: description: The [ISO-3166-1 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html) of the blocked country. example: AD type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: list_blocked_incoming_email_countries type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return blocked email countries list tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n list_blocked_incoming_email_countries\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/list_blocked_incoming_email_countries?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '84' /list_blocked_incoming_email_domains: get: description: This function lists which domains cannot send email to the server. operationId: Exim-list_blocked_incoming_email_domains parameters: [] responses: '200': content: application/json: schema: properties: data: properties: domains: description: An array of objects that contains each blocked domain. items: properties: domain: description: The blocked domain. example: example.com type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: list_blocked_incoming_email_domains type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return blocked email domains list tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n list_blocked_incoming_email_domains\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/list_blocked_incoming_email_domains?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '84' /list_pops_for: get: description: 'This function lists a cPanel account’s email accounts. To prevent falsified data or symlink exploitation, the function uses the specified cPanel account user, rather than `root` user, to read data from the user’s home directory. The system compares the collected data from the user’s home directory to a server-wide domains list. The comparison of the data validates whether you can trust the data. **Important:** When you disable the Receive Mail role, the system **disables** this function.' operationId: Email-list_pops_for parameters: - description: The cPanel account user for which to list all owned email accounts. in: query name: user required: true schema: example: example type: string responses: '200': content: application/json: schema: properties: data: properties: pops: description: An array of email accounts that the cPanel user owns. items: example: example1@example.com format: email type: string type: array type: object metadata: properties: command: description: The method name called. example: list_pops_for type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return cPanel account's email accounts tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n list_pops_for \\\n user='example'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/list_pops_for?api.version=1&user=example x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.50' /mail_sni_status: get: description: 'This function retrieves the status of the domain''s SNI mail services. **Note:** Functions that disable Mail SNI fail and make no changes.' operationId: SSL-mail_sni_status parameters: - description: The account's domain. in: query name: domain required: true schema: example: example.com type: string responses: '200': content: application/json: schema: properties: data: properties: enabled: description: 'Whether SNI for mail is enabled. - `1` — Enabled. - `0` — Disabled.' enum: - 0 - 1 example: 1 type: integer type: object metadata: properties: command: description: The method name called. example: mail_sni_status type: string reason: description: 'The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.' example: OK type: string result: description: '* `1` - Success * `0` - Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Return domain's SNI mail services status tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n mail_sni_status \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/mail_sni_status?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.48' /normalize_user_email_configuration: get: description: This function fixes a user's misconfigured email settings. This includes any misconfigured email file and directory ownership and permissions. operationId: Email-normalize_user_email_configuration parameters: - description: The cPanel account's username. in: query name: username required: true schema: example: username type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: normalize_user_email_configuration type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Repair misconfigured email settings tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n normalize_user_email_configuration \\\n username='username'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/normalize_user_email_configuration?api.version=1&username=username x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '88' /rebuild_mail_sni_config: get: description: This function rebuilds the mail SNI configuration files. operationId: SSL-rebuild_mail_sni_config parameters: - description: 'Whether to reload the Dovecot service after the system rebuilds the configuration files. * `1` - Reload Dovecot. * `0` - Do **not** reload Dovecot.' in: query name: reload_dovecot required: false schema: default: 0 enum: - 0 - 1 example: 1 type: integer responses: '200': content: application/json: schema: properties: data: properties: configs_built: description: "list of configuration files that this function rebuilt.\n\n**Note:**\n\n The function only returns this value if you call it as the root user." items: example: /etc/dovecot/sni.conf type: string type: array success: description: 'Whether the system rebuilt the configuration files. * `1` - The system rebuilt the configuration files. * `0` - The system did **not** rebuild the configuration files.' enum: - 0 - 1 example: 1 type: integer type: object metadata: properties: command: description: The method name called. example: rebuild_mail_sni_config type: string reason: description: The `reason` the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` - Success. * `0` - Failed. Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Rebuild mail SNI configuration files tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n rebuild_mail_sni_config\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/rebuild_mail_sni_config?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.48' /release_outgoing_email: get: description: 'This function releases outgoing email in the email queue for a single cPanel account user. **Note:** If mail for a cPanel user''s account is suspended, the system will reject their email before the mail server puts it in queue.' operationId: Accounts-release_outgoing_email parameters: - description: The cPanel account. in: query name: user required: true schema: example: example type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: release_outgoing_email type: string reason: description: The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Release cPanel account queued outgoing emails tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n release_outgoing_email \\\n user='example'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/release_outgoing_email?api.version=1&user=example x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '56' /remove_dmarc: get: description: 'This function removes the DMARC DNS record from a domain. **Note:** You **cannot** remove DMARC records from temporary domains.' operationId: EmailAuth-remove_dmarc parameters: - description: 'The domain for which to remove the DMARC record. **Note:** If you do not include this argument, the system will remove **all** DMARC records from **all** domains. To remove multiple domain DMARC records, duplicate the parameter name. For example, use the `domain=example-1.com`, `domain=example-2.com`, and `domain=example-3.com` parameters.' examples: multiple: summary: To remove multiple domain DMARC records value: domain=example-1.com domain=example-2.com domain=example-3.com single: summary: To remove a single domain DMARC record value: example.com in: query name: domain required: false schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects that contains information about the DMARC records that were removed. items: properties: domain: description: The domain for which the system removed the DMARC record. example: example.com type: string msg: description: Information about the removed DMARC record. example: '[REMOVE:TXT@_dmarc.exmaple.com:v=DMARC1; p=reject;]' type: string status: description: 'Whether the system removed the domain''s DMARC record on the DNS server. - `1` — The system removed the domain''s DMARC record. - `0` — The system did *not* remove the domain''s DMARC record.' enum: - 0 - 1 example: 1 type: integer type: object type: array type: object metadata: properties: command: description: The method name called. example: remove_dmarc type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Remove domains' DMARC records tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n remove_dmarc \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/remove_dmarc?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '124' /save_spamd_config: get: description: 'This function configures your Apache SpamAssassin™ options. **Important:** When you disable the Spam Filter role, the system disables this function.' operationId: Spamd-save_spamd_config parameters: - description: 'A comma-separated list of IP addresses to authorize to access the spamd daemon. **Note:** * If you do **not** specify a value, the `spamd` daemon allows connections from any IP address. * If you set a value for this parameter, it **must** include `127.0.0.1` in the list of values so that the `chkservd` daemon can access the `spamd` daemon.' explode: false in: query name: allowedips required: false schema: example: 127.0.0.1,192.168.0.1 type: string style: form - description: The maximum number of children per `spamd` process. in: query name: maxchildren required: false schema: example: 5 minimum: 1 type: integer - description: The maximum number of connections that the `spamd` daemon allows per child process. in: query name: maxconnperchild required: false schema: example: 200 minimum: 1 type: integer - description: 'The process ID''s file path. **Warning:** This parameter changes the `spamd` daemon''s process ID filepath. On systems that use the `systemd` daemon, you must update the `PIDFile` parameter in the `spamd.service` definition. If you do not update the `PIDFile` parameter, the `spamd` daemon will fail to function because the PID path and the `PIDFile` parameter will not match.' in: query name: pidfile required: false schema: example: /var/run/spamd.pid type: string - description: 'The maximum amount of time that a child process waits before it abandons a TCP connection. **Note:** If the value of this parameter is `0`, child processes will **not** abandon TCP connections.' in: query name: timeoutchild required: false schema: example: 300 minimum: 0 type: integer - description: 'The maximum amount of time that the `spamd` daemon waits before it abandons a TCP connection. **Note:** If the value of this parameter is `0`, `spamd` will **not** abandon TCP connections.' in: query name: timeouttcp required: false schema: example: 30 minimum: 0 type: integer responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: save_spamd_config type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` - Success. * `0` - Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Update Apache SpamAssassin™ configuration tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n save_spamd_config\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/save_spamd_config?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.44' /set_default_dmarc_record: get: description: 'This function sets the server''s default DMARC record. The system uses the default DMARC record when creating new accounts or applying DMARC policies that don''t specify a custom record. **Note:** You can pass an empty string to remove the custom default and revert to the built-in default record.' operationId: EmailAuth-set_default_dmarc_record parameters: - description: 'The DMARC record to set as the server default. **Note:** The record must be a valid DMARC record that starts with `v=DMARC1;` and contains a policy directive (p=none, p=quarantine, or p=reject). Pass an empty string to remove the custom default and revert to the built-in default. Visit the following link for more information about the DMARC record specification: https://dmarc.org/resources/specification/.' examples: basic: summary: A basic DMARC record with none policy value: v=DMARC1; p=none; remove: summary: Remove custom default (empty string) value: '' in: query name: record required: false schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An object that contains the operation result. properties: success: description: 'Indicates whether the operation was successful. * `1` - The default DMARC record was set successfully.' example: 1 type: integer type: object type: object metadata: properties: command: description: The method name called. example: set_default_dmarc_record type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Set the server's default DMARC record tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_default_dmarc_record \\\n record='v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com;'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_default_dmarc_record?api.version=1&record=v%3DDMARC1%3B%20p%3Dquarantine%3B%20rua%3Dmailto%3Admarc-reports%40example.com%3B x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '124' /set_manual_mx_redirects: get: description: 'This function lets you create a manual Exim mail exchanger (MX) redirect for a domain. An MX redirection lets you bypass the domain''s MX lookup via the Domain Name System (DNS). This function adds the manual redirect entries to the /etc/manualmx file. **Note:** To remove a domain''s manual MX redirection, use the WHM API 1 unset_manual_mx_redirect function.' operationId: Exim-set_manual_mx_redirects parameters: - description: "The domain for which to add a manual MX redirect entry.\n\n**Note:**\n\n To add multiple domain entries, increment the parameter. For example, use the domain, domain-1, and domain-2 parameters. For multiple domains, you must include its corresponding mx_host value." in: query name: domain required: true schema: example: example.com type: string - description: "The domain or IP address (IPv4 or IPv6) to redirect the domain value's emails to.\n\n**Note:**\n\n To add multiple MX hosts, increment the parameter. For example, use the mx_host, mx_host-1, and mx_host-2 parameters. For multiple MX hosts, you must include its corresponding domain value." in: query name: mx_host required: true schema: example: mailhostexample.com type: string responses: '200': content: application/json: schema: properties: data: properties: payload: additionalProperties: description: The domain’s former MX redirect target, or null if the domain did not have an MX redirect target before. example: mailhostexample.com type: - string - 'null' x-additionalPropertiesName: domain description: The former manual MX redirect entry for each domain. example: example.com: mailhostexample.com example.org: null type: object type: object metadata: properties: command: description: The method name called. example: set_manual_mx_redirects type: string reason: description: The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds. example: OK type: string result: description: '- 1 - Success - 0 - Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Add manual mail exchanger redirect record tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_manual_mx_redirects \\\n domain='example.com' \\\n mx_host='mailhostexample.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_manual_mx_redirects?api.version=1&domain=example.com&mx_host=mailhostexample.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '90' /set_user_email_forward_destination: get: description: 'This function sets the destination to which the system forwards a system account''s email. **Notes:** * Usually, the system sends notices about the server''s problems and activity to the `root` account. * If you do **not** use the `suexec` module, the `nobody` user receives bounce messages from email that CGI scripts send.' operationId: Email-set_user_email_forward_destination parameters: - description: 'The system account name or email address to which you wish to forward email. **Note:** To forward messages to multiple accounts or email addresses, use a comma-separated list.' in: query name: forward_to required: true schema: example: user type: string - description: The system account name to forward. in: query name: user required: true schema: example: root type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: set_user_email_forward_destination type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Update cPanel account email forward destination tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n set_user_email_forward_destination \\\n user='root' \\\n forward_to='user'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/set_user_email_forward_destination?api.version=1&user=root&forward_to=user x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11.52' /suspend_outgoing_email: get: description: 'This function sets Exim''s queue to suspend and force failure for email that a user sends to an external address. **Note:** If mail for a cPanel user''s account is suspended, the system will reject their email before the mail server puts it in queue.' operationId: Accounts-suspend_outgoing_email parameters: - description: 'The cPanel account. **Note** You **cannot** suspend the `root` user''s outgoing email with this function.' in: query name: user required: true schema: example: example type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: suspend_outgoing_email type: string reason: description: The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` - Success * `0` - Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Suspend cPanel account outgoing email tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n suspend_outgoing_email \\\n user='example'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/suspend_outgoing_email?api.version=1&user=example x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '56' /terminate_cpuser_mailbox_sessions: get: description: 'This function terminates all IMAP and POP3 connections for a cPanel account. **Note:** This function ends connections for every email address, which includes the default address.' operationId: Mailboxes-terminate_cpuser_mailbox_sessions parameters: - description: The cPanel account's username. in: query name: username required: true schema: example: username format: username type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: terminate_cpuser_mailbox_sessions type: string reason: description: The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds. example: OK type: string result: description: '- 1 - Success - 0 - Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Stop cPanel account IMAP and POP3 connections tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n terminate_cpuser_mailbox_sessions \\\n username='username'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/terminate_cpuser_mailbox_sessions?api.version=1&username=username x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '90' /unblock_incoming_email_from_country: get: description: This function unblocks email from specific countries. operationId: Exim-unblock_incoming_email_from_country parameters: - description: "The country to unblock. A valid [ISO 3166-1 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html) two-letter country code.\n\n**Note:**\n* To search all available country codes, read the ISO's [Full list of Country Codes](https://www.iso.org/obp/ui) documentation.\n* To unblock multiple countries, duplicate or increment the parameter name. For example, to unblock three countries, you could:\n - Use the `country_code` parameter multiple times.\n - Use the `country_code`, `country_code-1`, and `country_code-2` parameters." examples: multiple: description: To unblock multiple country codes. value: country_code=US&country_code=AD multiple-alternative: description: To unblock multiple country codes using index parameters. value: country_code=US&country_code-1=AD&country_code-2=ES single: description: To unblock one country code. value: US in: query name: country_code schema: type: string responses: '200': content: application/json: schema: properties: data: properties: updated: description: 'Whether the function unblocked one or more countries. * `1` - Success. * `0` - Failure. **Note:** If the server already doesn''t block that country, `updated` will return `0`.' enum: - 0 - 1 example: 1 type: integer type: object metadata: properties: command: description: The method name called. example: unblock_incoming_email_from_country type: string reason: description: The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` - Success * `0` - Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Remove block on emails from specific countries tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n unblock_incoming_email_from_country\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/unblock_incoming_email_from_country?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '84' /unblock_incoming_email_from_domain: get: description: This function unblocks email from specific domains. operationId: Exim-unblock_incoming_email_from_domain parameters: - description: 'The domain to unblock. **Note:** * The function returns `0` for the updated return if the server already doesn''t block that domain. * An FQDN requires **at least** [a label, a dot (`.`), and a top-level domain (TLD)](https://en.wikipedia.org/wiki/Domain_name#Domain_name_syntax). * Enter an asterisk (`*`) to represent [a wildcard label or TLD](https://en.wikipedia.org/wiki/Wildcard_DNS_record). * To unblock multiple domains, duplicate or increment the parameter name.' examples: multiple: summary: Multiple domains. value: domain=example.com domain-1=example1.com domain-2=example2.com multiple-alternative: summary: Multiple domains. value: domain=example.com domain=example1.com domain=example2.com single: summary: A single domain. value: example.com in: query name: domain required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: updated: description: 'Whether the function unblocked one or more domains. * `1` — Success. * `0` — Failure.' enum: - 0 - 1 example: 1 type: integer type: object metadata: properties: command: description: The method name called. example: unblock_incoming_email_from_domain type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Remove block on emails from specific domains tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n unblock_incoming_email_from_domain \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/unblock_incoming_email_from_domain?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '84' /unset_manual_mx_redirects: get: description: 'This function removes a domain''s manual Exim mail exchanger (MX) redirect entry. The function also removes the manual MX redirect entry from the /etc/manualmx file. **Note:** To set a domain''s manual MX redirection, use the WHM API 1 set_manual_mx_redirects function.' operationId: Exim-unset_manual_mx_redirects parameters: - description: "The domain for which to remove a manual MX redirect entry.\n\n**Note:**\n\n To remove multiple domain entries, increment the parameter. For example, use the domain, domain-1, and domain-2 parameters." in: query name: domain required: true schema: example: example.com type: string responses: '200': content: application/json: schema: properties: data: properties: payload: additionalProperties: description: The domain’s former MX redirect target, or null if the domain did not have an MX redirect target. example: mailhostexample.com type: - string - 'null' x-additionalPropertiesName: domain description: The removed manual MX redirect entry for each domain. example: example.com: mailhostexample.com example.org: null type: object type: object metadata: properties: command: description: The method name called. example: unset_manual_mx_redirects type: string reason: description: The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds. example: OK type: string result: description: '- 1 - Success - 0 - Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Remove manual mail exchanger redirect record tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n unset_manual_mx_redirects \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/unset_manual_mx_redirects?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '90' /unsuspend_outgoing_email: get: description: This function unsuspends outgoing email for a cPanel account's users. operationId: Accounts-unsuspend_outgoing_email parameters: - description: The cPanel account. in: query name: user required: true schema: example: example type: string responses: '200': content: application/json: schema: properties: metadata: properties: command: description: The method name called. example: unsuspend_outgoing_email type: string reason: description: The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` - Success * `0` - Failed: Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Unsuspend account outgoing email tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n unsuspend_outgoing_email \\\n user='example'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/unsuspend_outgoing_email?api.version=1&user=example x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '56' /validate_current_dkims: get: description: This function retrieves and checks the DomainKeys Identified Mail (DKIM) records for one or more domains. operationId: EmailAuth-validate_current_dkims parameters: - description: 'The domain for which to check the DKIM records. **Note:** To check multiple domains, duplicate or increment the parameter name. For example, `domain-1`, `domain-2`, and `domain-3` parameters.' examples: multiple: summary: Check the DKIM records for multiple domains. value: domain-1=example.com&domain-2=example.com&domain-3=example3.com multiple-alternative: summary: Check the DKIM records for multiple domains. value: domain=example.com&domain=example2.com&domain=example3.com single: summary: Check the DKIM records for a single domain. value: example.com in: query name: domain required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects containing information about the domain's DKIM records. example: - domain: default._domainkey.example.com expected: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDw5nw4NP1RsWXlfmiMzByDfOT16QCZO/xJtrPZKskZF8/sU0zWGTqKUOErlyJfoJzMDUv3/zzjGswc2nEmYqxxoQZaBkN4QaS6MvJQxysAr+sK8C248/r9zMperQdhJedUVejtpFQHJwgqpHy1tQMxY37L7sQjdxmQ5WnQ1acXiwIDAQAB\ records: - current: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDw5nw4NP1RsWXlfmiMzByDfOT16QCZO/xJtrPZKskZF8/sU0zWGTqKUOErlyJfoJzMDUv3/zzjGswc2nEmYqxxoQZaBkN4QaS6MvJQxysAr+sK8C248/r9zMperQdhJedUVejtpFQHJwgqpHy1tQMxY37L7sQjdxmQ5WnQ1acXiwIDAQAB\ state: VALID state: VALID validity_cache_update: valid - domain: default._domainkey.example2.com error: (XID 4krw35) DNS returned “SERVFAIL” (code 2) in response to the system’s query for “default._domainkey.example2.com”’s “TXT” records. expected: v=DKIM1; k=rsa; p=MIIBIjAAAgkrhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4mA8NH3BkYvOmB0+ll23U78JesahG8304unKhW+MAm0ZE+i6EWN6iXhUj7FRPvI/6jFRd7qAHCPKFLo5+/PTy8C8eK312tfSnF3N0eucYFbgZ8F8iSRdgrcgEjvJ1vM1uvcUF211yd/e3jxT2Ge4/fmZcTYNjfH3uAuriv61L6pdIwHUWPhcjQvgOQoKQgXgooCUbUkWFDkMAH+EF/0g1dnXf289LjlvQsKhY7Y135Zpvm21kjUcj5mrLDlHJALzCVb8K/r/LCxjV5GFUyJiiNLAxkI9V1vZ4pMQvKIsN7wzu6gXK87w6mEWvKvipMAP8A2choDrk6H/fcQtfNodgwIDADAB; records: [] state: ERROR validity_cache_update: none items: properties: domain: description: The domain that the function used to check the DKIM record with a `default._domainkey` prefix. type: string error: description: 'An error message that details the reason why the DNS lookup failed. **Note:** The function **only** returns this value when the `state` return is the `ERROR` value.' type: string expected: description: The DKIM record's contents. type: string records: description: The domain's DNS `DKIM TXT` records. items: properties: current: description: The full contents of the domain's `DKIM TXT` record data. type: string state: description: 'The DKIM TXT record''s status. * `VALID` — The `DKIM TXT` record matches the local server''s public key. * `MISMATCH` — The `DKIM TXT` record does **not** match the local server''s public key. * `PERMFAIL` — Multiple `DKIM TXT` records for the domain exist or a misconfigured `DKIM TXT` record exists.' enum: - VALID - MISMATCH - PERMFAIL type: string type: object type: array state: description: 'The domain''s DKIM record status. * `VALID` — The DKIM record is valid. * `MALFORMED` — A single DKIM record exists, but the record does **not** match the expected DKIM specifications. * `MISMATCH` — A DKIM record exists, but it does **not** match the expected public key. * `MISSING` — No DKIM record exists for the domain. * `MULTIPLE` — Multiple DKIM records exist. * `NOPUB` — No key exists on the local server for the domain. * `ERROR` — The record''s DNS lookup failed. The function returns the reason in the `error` return value.' enum: - VALID - MALFORMED - MISMATCH - MISSING - MULTIPLE - NOPUB - ERROR type: string validity_cache_update: description: 'The result of the DKIM record''s validity cache update operation. * `set` — The domain is invalid but passed its validity check. The validity check now passes the domain as valid. * `valid` — The domain is valid and passed its validity check. There are no changes required. * `none` — The domain is invalid but the system will **not** take further action. * `error` — The domain''s validity check operation failed.' enum: - set - valid - none - error type: string type: object type: object metadata: properties: command: description: The method name called. example: validate_current_dkims type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 1 - 0 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Validate DKIM records tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n validate_current_dkims \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/validate_current_dkims?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' /validate_current_dmarcs: get: description: This function retrieves and checks the DMARC record for one or more domains. operationId: EmailAuth-validate_current_dmarcs parameters: - description: 'The domain for which to check the DMARC record. **Note:** To check multiple domains, duplicate or increment the parameter name. For example, `domain-1`, `domain-2`, and `domain-3` parameters. If you do not include this argument, the system will validate DMARC records for all domains on the server.' examples: multiple: summary: Check the DMARC record for multiple domains. value: domain-1=example.com&domain-2=example.com&domain-3=example3.com multiple-alternative: summary: Check the DMARC record for multiple domains. value: domain=example.com&domain=example2.com&domain=example3.com single: summary: Check the DMARC records for a single domain. value: domain=example.com in: query name: domain required: false schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects containing information about the domain's DMARC records. example: - domain: example.com error: '' record: v=DMARC1; p=none; state: VALID subdomain: _dmarc.example.com suggested: v=DMARC1; p=none; - domain: example2.com error: (XID 4krw35) DNS returned “SERVFAIL” (code 2) in response to the system’s query for “_dmarc.example2.com”’s “TXT” records. record: '' state: DNS_ERROR subdomain: _dmarc.example2.com suggested: v=DMARC1; p=none; items: properties: domain: description: The target domain of the DMARC policy. example: example.com format: domain type: string error: description: A message that details either why the DNS lookup failed, or if there is a SPF/DKIM failure. example: '(XID 4krw35) DNS returned SERVFAIL (code 2) in response to the system''s query for _dmarc.example.com TXT records.' type: string record: description: The domain's DMARC TXT record. example: v=DMARC1; p=none; type: string state: description: 'The domain''s DMARC record status. Possible values: * `VALID` - A DMARC policy is set for the domain, along with valid SPF and DKIM records for the domain and IP address. * `MALFORMED` - A DMARC record is set, but it did not pass a syntax check. * `DKIM_SPF_ERROR` - A DMARC record exists; however, both the DKIM and SPF records for this domain did not pass validation. * `DKIM_ERROR` - A DMARC record exists; however, the DKIM record for this domain did not pass validation. * `SPF_ERROR` - A DMARC record exists; however, the SPF record for this domain did not pass validation. * `MISSING` - No DMARC policy record exists for the domain at the DMARC subdomain location. * `DNS_ERROR` - A DNS error prevented validation of the DMARC record.' enum: - VALID - MALFORMED - DKIM_SPF_ERROR - DKIM_ERROR - SPF_ERROR - MISSING - DNS_ERROR example: VALID type: string subdomain: description: 'The domain that the function used to check the DMARC record. This will be the value of the `domain` parameter with a `_dmarc` prefix.' example: _dmarc.example.com format: domain type: string suggested: description: The recommended DMARC policy. example: v=DMARC1; p=none; type: string type: object type: object metadata: properties: command: description: The method name called. example: validate_current_dmarcs type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 1 - 0 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Validate DMARC records tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n validate_current_dmarcs \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/validate_current_dmarcs?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '124' /validate_current_installed_exim_config: get: description: This function validates the system's current Exim configuration. operationId: Exim-validate_current_installed_exim_config parameters: [] responses: '200': content: application/json: schema: properties: data: properties: message: description: A list of Exim's configuration parameters. example: "
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" format: HTML type: string type: object metadata: properties: command: description: The method name called. example: validate_current_installed_exim_config type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: Your configuration is currently valid. type: string result: description: '* `1` - Success. * `0` - Failed. Check the reason field for more details.' enum: - 0 - 1 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Validate Exim configuration tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n validate_current_installed_exim_config\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/validate_current_installed_exim_config?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' /validate_current_ptrs: get: description: This function validates the pointer records (PTR) for IPv4 and IPv6 addresses an account's domains send mail from. It retrieves the PTR records for each IP address and determines which of the domain's IP addresses send mail. It then validates the PTR records for each IP address and validates the A (IPv4) or AAAA (IPv6) records pointing to each domain. This function also ensures that at least one of that domain's A or AAAA records points back to the IP address. operationId: EmailAuth-validate_current_ptrs parameters: - description: 'The domain for which to validate the PTR records. **Note:** To check multiple domains, duplicate or increment the parameter name. For example, use the `domain-1`, `domain-2`, and `domain-3` parameters.' examples: multiple: summary: Validate multiple domains' PTR records. value: domain-1=example.com domain-2=example2.com domain-3=example3.com multiple-alternative: summary: Validate multiple domains' PTR records. value: domain=example.com&domain=example2.com&domain=example3.com single: summary: Validate a single domain's PTR records. value: example.com in: query name: domain required: true schema: type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects containing information about the account's PTR records. example: - arpa_domain: 1.0.0.10.in-addr.arpa domain: example.com helo: example.com ip_address: 10.0.0.1 ip_version: 4 nameservers: - ns1.example.com - ns2.example.com - ns3.example.com ptr_records: - domain: example.com forward_records: - 10.0.0.1 state: VALID state: VALID - arpa_domain: 3.0.0.10.in-addr.arpa domain: example.com helo: example.com ip_address: 10.0.0.3 ip_version: 4 nameservers: - ns1.example.com - ns2.example.com - ns3.example.com ptr_records: - domain: example.com forward_records: - 192.168.12.34 state: FWD_MISMATCH state: PTR_MISMATCH - arpa_domain: 4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa domain: example.com helo: example.com ip_address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 ip_version: 6 nameservers: - ns1.example.com - ns2.example.com - ns3.example.com ptr_records: - domain: example.com forward_records: - 2001:0db8:85a3:0000:0000:8a2e:0370:7334 state: VALID state: VALID - arpa_domain: 2.0.0.10.in-addr.arpa domain: example.com helo: example.com ip_address: 10.0.0.2 ip_version: 4 nameservers: - ns1.example.com - ns2.example.com - ns3.example.com ptr_records: [] state: MISSING_PTR - domain: thisotheremaildomain.com error: 1.1.1.1.1 is not a valid IP address. helo: thisothermaildomain.com ip_address: 1.1.1.1.1 ptr_records: [] state: ERROR - arpa_domain: 4.0.0.10.in-addr.arpa domain: example.com helo: example.com ip_address: 10.0.0.4 ip_version: 4 nameservers: - ns1.example.com - ns2.example.com - ns3.example.com ptr_records: - domain: example.com forward_records: [] state: MISSING_FWD state: PTR_MISMATCH items: properties: arpa_domain: description: 'The IP address used to perform a [reverse DNS (rDNS) lookup](https://go.cpanel.net/HowtoConfigureReverseDNSforBINDinWHM), in reversed format and appended with one of the following: * `in-addr.arpa` — An IPv4 address * `ip6.arpa` — An IPv6 address. For information about `.arpa` domains, read Wikipedia''s [Reverse DNS lookup](https://en.wikipedia.org/wiki/Reverse_DNS_lookup) article. **Note:** The function does **not** return this value for a domain with an invalid IP address.' type: string domain: description: The queried domain. type: string error: description: 'An error message that details the reason why the domain''s IP address validation failed. **Note:** The function **only** returns this value when the `state` return is the `ERROR` value.' type: string helo: description: The hostname that the domain uses to identify itself to remote SMTP servers. format: hostname type: string ip_address: description: 'The IPv4 or IPv6 address. **Note:** The function does **not** return this value for a domain with an invalid IP address.' type: string ip_version: description: 'The IP version number. * `4` — An IPv4 address. * `6` — An IPv6 address. **Note:** The function does **not** return this value for a domain with an invalid IP address.' type: integer nameservers: description: An array of the authoritative nameservers for the domain's PTR record. items: type: string type: array ptr_records: description: 'An array of objects containing the domain''s PTR records. **Note:** The function does **not** return this array for a domain with an invalid IP address.' items: properties: domain: description: The fully qualified domain name (FQDN) that a PTR record points to. type: string forward_records: description: An array of IP addresses that the domain resolves to for A (IPv4) and AAAA (IPv6) records. items: type: string type: array state: description: 'Whether the domain''s PTR record points to a domain with an A (IPv4) or a AAAA (IPv6) record. * `VALID` — The PTR record is valid. * `MISSING_FWD` — The PTR points to a domain without an A or AAAA record. * `FWD_MISMATCH` — The PTR record points to a domain without an A or AAAA record that points back to the IP address.' enum: - VALID - MISSING_FWD - FWD_MISMATCH type: string type: object type: array state: description: 'Whether the PTR records are valid for the domain. * `ERROR` — The domain''s IP address is invalid. The function returns the reason in the `error` return. * `IP_IS_PRIVATE` — The IP address exists within a range of private IP addresses. DNS does **not** define PTR records for private IP addresses. * `VALID` — The PTR record is valid. The function **only** returns this response if **all** of an IP address''s PTR records are valid. * `MISSING_PTR` — No PTR record exists for the IP address. * `PTR_MISMATCH` — One or more PTR records point to a domain that does not point back to the correct IP address.' enum: - ERROR - IP_IS_PRIVATE - VALID - MISSING_PTR - PTR_MISMATCH type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: validate_current_ptrs type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 1 - 0 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Validate domain PTR records tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n validate_current_ptrs \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/validate_current_ptrs?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' /validate_current_spfs: get: description: This function validates a Sender Policy Framework (SPF) record for one or more domains. operationId: EmailAuth-validate_current_spfs parameters: - description: The domain for which to check the SPF records. examples: multiple: summary: Check multiple domains. value: domain-1=example.com domain-2=example2.com domain-3=example3.com multiple-alternative: summary: Check multiple domains. value: domain=example.com domain=example2.com domain=example3.com single: summary: Check a single domain. value: example.com in: query name: domain required: true schema: format: domain type: string responses: '200': content: application/json: schema: properties: data: properties: payload: description: An array of objects containing information about a domain's SPF records. example: - domain: example.com expected: ip6:0:0:0:0:0:ffff:c0a8:101 ip_address: 0:0:0:0:0:ffff:c0a8:101 ip_version: 6 records: - current: v=spf1 ~all reason: 'example.com: Sender is not authorized by default to use ''example.com'' in ''helo'' identity (mechanism ''-all'' matched)' state: FAIL state: VALID - domain: example2.com error: (XID rm8h9f) DNS returned “SERVFAIL” (code 2) in response to the system’s query for “example2.com”’s “TXT” records. ip_address: 198.252.32.45 ip_version: 4 records: [] state: ERROR items: properties: domain: description: The queried domain. format: domain type: string error: description: 'An error message that details the reason why the DNS lookup failed. **Note:** The function **only** returns this value when the `state` return is the `ERROR` value.' type: string expected: description: The SPF record for the domain in the DNS. type: string ip_address: anyOf: - format: ipv4 type: string - format: ipv6 type: string description: The domain's IPv4 or IPv6 address. ip_version: description: 'The IP address version. * `4` — IPv4. * `6` — IPv6.' enum: - 4 - 6 type: integer records: description: The SPF records of the domain's DNS. items: properties: current: description: The SPF record's contents. type: string reason: description: The reason for the SPF record's status. type: string state: description: 'The SPF record''s status. * `PASS` — The SPF record confirms that the `ip_address` value is a valid sender. * `NEUTRAL` — The current SPF record configuration does not determine the `ip_address` value''s validity. * `FAIL` — The SPF record states that the `ip_address` value is **not** a valid sender. * `SOFTFAIL` — The SPF record states that the `ip_address` value is **not** a valid sender, but does not `FAIL` state it. * `TEMPERROR` — The SPF record check resulted in a failure. For example, a network failure. * `PERMERROR` — The domain''s SPF records are **incorrect** and require manual correction. **Note:** These values correspond with [RFC 7208 section 2.6](https://tools.ietf.org/html/rfc7208#section-2.6).' enum: - PASS - NEUTRAL - FAIL - SOFTFAIL - TEMPERROR - PERMERROR type: string type: object type: array state: description: 'The SPF record''s status. * `VALID` — A single `SPF TXT` record exists in the domain''s DNS with the correct `ip_address` value or redirect mechanism. * `MISMATCHED` — An `SPF TXT` record exists for the domain that does **not** match the `ip_address` value. * `MULTIPLE` — Multiple `SPF TXT` records exist in the domain''s DNS. * `MISSING` — No `SPF TXT` record exists for the domain''s DNS. * `ERROR` — The record''s DNS lookup failed. The system returns the reason in the `error` return.' enum: - VALID - MISMATCHED - MULTIPLE - MISSING - ERROR type: string type: object type: array type: object metadata: properties: command: description: The method name called. example: validate_current_spfs type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 1 - 0 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Validate domain SPF records tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n validate_current_spfs \\\n domain='example.com'\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/validate_current_spfs?api.version=1&domain=example.com x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '78' /validate_exim_configuration_syntax: get: description: '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.' operationId: Exim-validate_exim_configuration_syntax parameters: - description: 'The Exim configuration file''s raw text. **Note:** If you do not use this parameter, the function will analyze Exim''s current configuration.' in: query name: cfg_text required: false schema: example: RAW_CONFIGURATION_TEXT format: HTML type: string - description: '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.' in: query name: section required: false schema: example: acl type: string responses: '200': content: application/json: examples: error_msg: summary: An invalid Exim configuration. value: command: validate_exim_configuration_syntax data: broken_cfg_html: RAW_CONFIGURATION_TEXT broken_cfg_text: '==>RAW_CONFIGURATION_TEXT<== ' error_line: 1 error_msg: This is an error message. output: raw: ' ' reason: OK result: 1 version: 1 exim_caps: summary: A valid Exim configuration. value: command: validate_exim_configuration_syntax data: exim_caps: add_header: 1 archive: 1 boxtrapper: 1 content_scanning: 1 directives: accept_8bitmime: 1 acl_not_smtp: 1 acl_not_smtp_mime: 1 acl_not_smtp_start: 1 acl_smtp_auth: 1 acl_smtp_connect: 1 acl_smtp_data: 1 acl_smtp_data_prdr: 1 acl_smtp_dkim: 1 acl_smtp_etrn: 1 acl_smtp_expn: 1 acl_smtp_helo: 1 acl_smtp_mail: 1 acl_smtp_mailauth: 1 acl_smtp_mime: 1 acl_smtp_notquit: 1 acl_smtp_predata: 1 acl_smtp_quit: 1 acl_smtp_rcpt: 1 acl_smtp_starttls: 1 acl_smtp_vrfy: 1 add_environment: 1 admin_groups: 1 allow_domain_literals: 1 allow_mx_to_ip: 1 allow_utf8_domains: 1 auth_advertise_hosts: 1 auto_thaw: 1 av_scanner: 1 bi_command: 1 bounce_message_file: 1 bounce_message_text: 1 bounce_return_body: 1 bounce_return_linesize_limit: 1 bounce_return_message: 1 bounce_return_size_limit: 1 bounce_sender_authentication: 1 callout_domain_negative_expire: 1 callout_domain_positive_expire: 1 callout_negative_expire: 1 callout_positive_expire: 1 callout_random_local_part: 1 check_log_inodes: 1 check_log_space: 1 check_rfc2047_length: 1 check_spool_inodes: 1 check_spool_space: 1 daemon_smtp_ports: 1 daemon_startup_retries: 1 daemon_startup_sleep: 1 delay_warning: 1 delay_warning_condition: 1 deliver_drop_privilege: 1 deliver_queue_load_max: 1 delivery_date_remove: 1 disable_ipv6: 1 dkim_verify_signers: 1 dns_again_means_nonexist: 1 dns_check_names_pattern: 1 dns_csa_search_limit: 1 dns_csa_use_reverse: 1 dns_dnssec_ok: 1 dns_ipv4_lookup: 1 dns_retrans: 1 dns_retry: 1 dns_trust_aa: 1 dns_use_edns0: 1 drop_cr: 1 dsn_advertise_hosts: 1 dsn_from: 1 envelope_to_remove: 1 errors_copy: 1 errors_reply_to: 1 event_action: 1 exim_group: 1 exim_path: 1 exim_user: 1 extra_local_interfaces: 1 extract_addresses_remove_arguments: 1 finduser_retries: 1 freeze_tell: 1 gecos_name: 1 gecos_pattern: 1 gnutls_allow_auto_pkcs11: 1 gnutls_compat_mode: 1 gnutls_require_kx: 1 gnutls_require_mac: 1 gnutls_require_protocols: 1 header_line_maxsize: 1 header_maxsize: 1 headers_charset: 1 helo_accept_junk_hosts: 1 helo_allow_chars: 1 helo_lookup_domains: 1 helo_try_verify_hosts: 1 helo_verify_hosts: 1 hold_domains: 1 host_lookup: 1 host_lookup_order: 1 host_reject_connection: 1 hosts_connection_nolog: 1 hosts_treat_as_local: 1 ignore_bounce_errors_after: 1 ignore_fromline_hosts: 1 ignore_fromline_local: 1 keep_environment: 1 keep_malformed: 1 local_from_check: 1 local_from_prefix: 1 local_from_suffix: 1 local_interfaces: 1 local_scan_timeout: 1 local_sender_retain: 1 localhost_number: 1 log_file_path: 1 log_selector: 1 log_timezone: 1 lookup_open_max: 1 max_username_length: 1 message_body_newlines: 1 message_body_visible: 1 message_id_header_domain: 1 message_id_header_text: 1 message_logs: 1 message_size_limit: 1 mua_wrapper: 1 never_users: 1 openssl_options: 1 percent_hack_domains: 1 perl_at_start: 1 perl_startup: 1 pid_file_path: 1 pipelining_advertise_hosts: 1 prdr_enable: 1 preserve_message_logs: 1 primary_hostname: 1 print_topbitchars: 1 process_log_path: 1 prod_requires_admin: 1 qualify_domain: 1 qualify_recipient: 1 queue_domains: 1 queue_list_requires_admin: 1 queue_only: 1 queue_only_file: 1 queue_only_load: 1 queue_only_load_latch: 1 queue_only_override: 1 queue_run_in_order: 1 queue_run_max: 1 queue_smtp_domains: 1 receive_timeout: 1 received_header_text: 1 received_headers_max: 1 recipient_unqualified_hosts: 1 recipients_max: 1 recipients_max_reject: 1 remote_max_parallel: 1 remote_sort_domains: 1 retry_data_expire: 1 retry_interval_max: 1 return_path_remove: 1 rfc1413_hosts: 1 rfc1413_query_timeout: 1 sender_unqualified_hosts: 1 slow_lookup_log: 1 smtp_accept_keepalive: 1 smtp_accept_max: 1 smtp_accept_max_nonmail: 1 smtp_accept_max_nonmail_hosts: 1 smtp_accept_max_per_connection: 1 smtp_accept_max_per_host: 1 smtp_accept_queue: 1 smtp_accept_queue_per_connection: 1 smtp_accept_reserve: 1 smtp_active_hostname: 1 smtp_banner: 1 smtp_check_spool_space: 1 smtp_connect_backlog: 1 smtp_enforce_sync: 1 smtp_etrn_command: 1 smtp_etrn_serialize: 1 smtp_load_reserve: 1 smtp_max_synprot_errors: 1 smtp_max_unknown_commands: 1 smtp_ratelimit_hosts: 1 smtp_ratelimit_mail: 1 smtp_ratelimit_rcpt: 1 smtp_reserve_hosts: 1 smtp_return_error_details: 1 spamd_address: 1 spf_guess: 1 split_spool_directory: 1 spool_directory: 1 sqlite_lock_timeout: 1 srs_config: 1 srs_hashlength: 1 srs_hashmin: 1 srs_maxage: 1 srs_secrets: 1 srs_usehash: 1 srs_usetimestamp: 1 strict_acl_vars: 1 strip_excess_angle_brackets: 1 strip_trailing_dot: 1 syslog_duplication: 1 syslog_facility: 1 syslog_processname: 1 syslog_timestamp: 1 system_filter: 1 system_filter_directory_transport: 1 system_filter_file_transport: 1 system_filter_group: 1 system_filter_pipe_transport: 1 system_filter_reply_transport: 1 system_filter_user: 1 tcp_nodelay: 1 timeout_frozen_after: 1 timezone: 1 tls_advertise_hosts: 1 tls_certificate: 1 tls_crl: 1 tls_dh_max_bits: 1 tls_dhparam: 1 tls_eccurve: 1 tls_ocsp_file: 1 tls_on_connect_ports: 1 tls_privatekey: 1 tls_remember_esmtp: 1 tls_require_ciphers: 1 tls_try_verify_hosts: 1 tls_verify_certificates: 1 tls_verify_hosts: 1 trusted_groups: 1 trusted_users: 1 unknown_login: 1 unknown_username: 1 untrusted_set_sender: 1 uucp_from_pattern: 1 uucp_from_sender: 1 warn_message_file: 1 write_rejectlog: 1 dkim: 1 domainkeys: 0 dovecot: 1 exiscan: 1 force_command: 1 maildir: 1 mailman: 1 no_forward_outbound_spam: 1 no_forward_outbound_spam_over_int: 0 notquit: 1 passwd: 1 rewrite_from_all: 0 rewrite_from_remote: 0 spf: 1 srs: 0 output: raw: ' ' reason: OK result: 1 version: 1 schema: properties: data: anyOf: - description: The function returns this object for an invalid Exim configuration. properties: broken_cfg_html: description: The line with the broken configuration, in HTML format. example: 'RAW_CONFIGURATION_TEXT ' format: HTML type: string broken_cfg_text: description: The line that includes the broken configuration. example: '==>RAW_CONFIGURATION_TEXT<== ' format: HTML type: string error_line: description: The first line in the Exim configuration file that contains an error. minimum: 1 type: integer error_msg: description: Any error messages that the validation script encountered. type: string type: object - properties: exim_caps: description: The function returns this object for a valid Exim configuration. properties: add_header: description: 'Whether the server supports the `add_header` directive. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer archive: description: 'Whether the server supports system-wide archives. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer boxtrapper: description: 'Whether the server supports BoxTrapper functionality. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer content_scanning: description: 'Whether the server supports content scanning functionality. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer directives: additionalProperties: description: 'Whether the directive is active or inactive on the server. * `1` — Active. * `0` — Inactive. **Note:** The return''s name is the directive''s name.' enum: - 1 - 0 type: integer description: A list of individual Exim directives. type: object dkim: description: 'Whether the server supports DomainKeys Identified Mail (DKIM). * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer domainkeys: description: 'Whether the server supports DKIM. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer dovecot: description: 'Whether the server supports Dovecot authentication. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer exiscan: description: 'Whether the server contains exiscan, which scans messages from authenticated senders for malware. * `1` — Contains exiscan. * `0` — Does **not** contain exiscan.' enum: - 1 - 0 type: integer force_command: description: 'Whether the server supports the `force_command` directive for pipe transports. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer maildir: description: 'Whether the server supports the Maildir format. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer mailman: description: 'Whether the server supports the Mailman feature. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer no_forward_outbound_spam: description: 'Whether the server will refuse to forward outbound spam if it matches the Apache SpamAssassin™ internal `spam_score` setting. * `1` — Server refuses to forward. * `0` — Server allows.' enum: - 1 - 0 type: integer no_forward_outbound_spam_over_int: description: 'Whether the server will refuse to forward outbound spam if it matches a defined Apache SpamAssassin score. * `1` — Server refuses to forward. * `0` — Server allows.' enum: - 1 - 0 type: integer notquit: description: 'Whether the server supports the `acl_smtp_notquit` ACL, which runs when an SMTP session ends without a `QUIT`. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer passwd: description: 'Whether the server supports password authentication. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer rewrite_from_all: description: 'Whether the server supports the rewrite function on all incoming mail. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer rewrite_from_remote: description: 'Whether the server can rewrite the outgoing `From:` header to the actual sender. * `1` — Can rewrite. * `0` — **Cannot** rewrite.' enum: - 1 - 0 type: integer spf: description: 'Whether the server supports SPF checks. * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer srs: description: 'Whether the server supports the Sender Rewriting Scheme (SRS). * `1` — Supports. * `0` — Does **not** support.' enum: - 1 - 0 type: integer type: object description: An object containing a valid or invalid Exim configuration information. type: object metadata: properties: command: description: The method name called. example: validate_exim_configuration_syntax type: string output: description: The function's raw HTML output, if any exists. format: HTML type: string reason: description: The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds. example: OK type: string result: description: '* `1` — Success. * `0` — Failed. Check the `reason` field for more details.' enum: - 1 - 0 example: 1 type: integer version: description: The version of the API function. example: 1 type: integer type: object description: HTTP Request was successful. summary: Validate Exim configure file syntax tags: - Mail x-codeSamples: - label: CLI lang: Shell source: "whmapi1 --output=jsonpretty \\\n validate_exim_configuration_syntax\n" - label: URL lang: HTTP source: https://hostname.example.com:2087/cpsess##########/json-api/validate_exim_configuration_syntax?api.version=1 x-cpanel-api-version: WHM API 1 x-cpanel-available-version: '11' components: securitySchemes: BasicAuth: scheme: basic type: http externalDocs: url: https://cpanel.net/developers/ x-tagGroups: - name: Account Restoration tags: - Restore Account - Restore Queue Management - Restore Queue Reporting - name: Accounts tags: - Account Creation - Account Enhancements - Account Management - Bandwidth and Disk Quotas - Domain Information - Passwords - Styles - Suspensions - name: API Development Tools tags: - API Execution - API Statistics - API Token Management - Applications - Session - name: Authentication tags: - Authentication Providers - External Authentication - Login URL - SSH Keys and Connections - Two-Factor Authentication - name: Backups tags: - Backup Destination - Backup or Restore - Backup Settings - Legacy Migration - name: Commerce Integration tags: - Market Integration - Sitejet - name: cPanel Market tags: - Product Management - Provider Management - name: cPanel Support Tickets tags: - Support Access - Ticket Management - name: Customizations tags: - Brand - Customizations - name: Databases tags: - Manage MySQL Server - MySQL Databases - PostgreSQL Databases - Remote MySQL Databases - name: DNS tags: - DNS Cluster Settings - DNS Security - DNS Zones - Domain Management - Domain Management - Resolvers - Service Records - name: Hosting Plans tags: - Feature Access - Feature Lists - Hosting Plan Extensions - Hosting Plans - name: InProductSurvey tags: - InProductSurvey - name: Integrations tags: - API Authentication - Links - Scripts Hooks - name: IP Address Management tags: - IPv4 Address Settings - IPv6 Address Settings - Network Address Translation - name: Login Security (cPHulk) tags: - Management - Reporting - Settings - name: Logs tags: - Web Log Retention - name: Mail tags: - cPanel Account Mail Management - Mail DNS Settings - Mail Server Settings - Spam Management - Spam Protection (Greylisting) - name: Monitoring tags: - 360 Monitoring - name: NGINX Manager tags: - NGINX Manager - name: Resellers tags: - Account Enhancement Limit - Account Limits - Account Permissions - Account Settings - Reseller Account Management - name: Security tags: - WHM Access - name: Server Administration tags: - Configuration Clusters - Configurations - Connected Applications - Connections - cPanel Analytics - License Management - Notifications - Plugin-Based Features - Security - Server Nodes - Server Profiles - Services - System Information - Updates - name: SSL Certificates tags: - Auto-Generated Certificates - cPanel Account Settings - SSL Server Settings - name: System Package Management tags: - Install or Uninstall Package - List Package Information - Package Manager Settings - name: Transfers tags: - cPanel Account Transfer - Transfer Configuration - Transfer Monitoring - name: UserData tags: - UserData - name: Web Server Configuration tags: - EasyApache Settings - PHP - PHP-FPM - name: Web Server Security (ModSecurity) tags: - Rule Settings - Rule Vendor Settings - Server Settings