Return domain's mail exchanger records

This function lists a domain's MX records.

Important:

When you disable the DNS role, the system disables this function.

Authorizations:
query Parameters
domain
required
string <domain>

The zone record's domain.

Example: domain=example.com

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  listmxs \
  domain='example.com'

Response samples

Content type
application/json
{
  • "data": {
    • "record": [
      • {
        • "Line": 1,
        • "class": "IN",
        • "exchange": "mail.example.com",
        • "name": "hostname.example.com",
        • "preference": 20,
        • "ttl": 86400,
        • "type": "MX"
        }
      ]
    },
  • "metadata": {
    • "command": "listmxs",
    • "reason": "Records obtained.",
    • "result": 1,
    • "version": 1
    }
}