---
title: "Return mail exchanger records"
method: GET
path: "/Email/list_mxs"
tags: ["Email DNS Settings"]
---

# Return mail exchanger records

`GET /Email/list_mxs`

This function lists Mail Exchanger (MX) records.

**Important:**

  When you disable the [*DNS* role](https://go.cpanel.net/serverroles), the system **disables** this function.

## Query parameters

- `domain` string, domain

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object[]
      - `alwaysaccept` 0 | 1 — Whether the domain's highest-priority mail exchanger accepts local mail. * `1` - Accept local mail. * `0` - Does **not** accept local mail.
      - `detected` 'auto' | 'local' | 'remote' | 'secondary' — The domain's highest-priority mail exchanger's type. * `auto` * `local` * `remote` * `secondary`
      - `domain` string, domain — The domain name.
      - `entries` object[] — An array of objects that contains information about mail exchangers.
        - `domain` string, domain — The mail exchanger's domain.
        - `entrycount` integer — The mail exchanger's order in the list of priorities. For example, the mail exchanger with the highest priority returns `1`, and the next highest priority returns `2`.
        - `mx` string, domain — The mail exchanger's name.
        - `priority` integer — The mail exchanger's [priority value](https://go.cpanel.net/whmdocsEditMXEntry).
        - `row` 'even' | 'odd' — Whether the mail exchanger is an odd or an even entry. * `even` * `odd`
      - `local` 0 | 1 — Whether the domain's highest priority mail exchanger is a local mail exchanger. * `1` - Local. * `0` - **Not** local.
      - `mx` string, domain — The domain's highest-priority mail exchanger's name.
      - `mxcheck` 'auto' | 'local' | 'remote' | 'secondary' — The domain's highest-priority mail exchanger's type. * `auto` * `local` * `remote` * `secondary`
      - `remote` 0 | 1 — Whether the domain's highest-priority mail exchanger is remote. * `1` - Remote. * `0` - **Not** remote.
      - `secondary` 0 | 1 — Whether the domain's highest-priority mail exchanger is secondary. * `1` - Secondary. * `0` - **Not** secondary.
      - `status` 0 | 1 — Whether the function succeeded. * `1` - Success. * `0` - Failure.
      - `statusmsg` string — A success or error message message. * A success message. * An error message.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
      - `transformed` 1 — Post-processing may have transformed the data.
    - `status` 0 | 1 — * `1` - Success. * `0` - Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
