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.

SecurityBasicAuth
Request
query Parameters
domain
required
string <domain>

The zone record's domain.

Example: domain=example.com
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/listmxs
Request samples
whmapi1 --output=jsonpretty \
  listmxs \
  domain='example.com'
Response samples
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
    }
}