# Return mail exchanger records This function lists Mail Exchanger (MX) records. When you disable the role, the system this function. Endpoint: GET /Email/list_mxs Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `domain` (string) The domain to query. If you do use this parameter, the function returns MX records for all of the cPanel account's domains. Example: "example.com" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "list_mxs" - `module` (string) The name of the module called. Example: "Email" - `result` (object) - `result.data` (array) - `result.data.alwaysaccept` (integer) Whether the domain's highest-priority mail exchanger accepts local mail. * - Accept local mail. * - Does accept local mail. Enum: 0, 1 - `result.data.detected` (string) The domain's highest-priority mail exchanger's type. * * * * Enum: "auto", "local", "remote", "secondary" - `result.data.domain` (string) The domain name. Example: "example.com" - `result.data.entries` (array) An array of objects that contains information about mail exchangers. - `result.data.entries.domain` (string) The mail exchanger's domain. Example: "example.com" - `result.data.entries.entrycount` (integer) The mail exchanger's order in the list of priorities. For example, the mail exchanger with the highest priority returns , and the next highest priority returns . Example: 1 - `result.data.entries.mx` (string) The mail exchanger's name. Example: "mx.example.com" - `result.data.entries.priority` (integer) The mail exchanger's [priority value](https://go.cpanel.net/whmdocsEditMXEntry). Example: 5 - `result.data.entries.row` (string) Whether the mail exchanger is an odd or an even entry. * * Enum: "even", "odd" - `result.data.local` (integer) Whether the domain's highest priority mail exchanger is a local mail exchanger. * - Local. * - local. Enum: 0, 1 - `result.data.mx` (string) The domain's highest-priority mail exchanger's name. Example: "mx.example.com" - `result.data.mxcheck` (string) The domain's highest-priority mail exchanger's type. * * * * Enum: "auto", "local", "remote", "secondary" - `result.data.remote` (integer) Whether the domain's highest-priority mail exchanger is remote. * - Remote. * - remote. Enum: 0, 1 - `result.data.secondary` (integer) Whether the domain's highest-priority mail exchanger is secondary. * - Secondary. * - secondary. Enum: 0, 1 - `result.data.status` (integer) Whether the function succeeded. * - Success. * - Failure. Enum: 0, 1 - `result.data.statusmsg` (string) A success or error message message. * A success message. * An error message. Example: "Fetched MX List" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.metadata.transformed` (integer) Post-processing may have transformed the data. Enum: 1 - `result.status` (integer) * - Success. * - Failed. Check the field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.