---
title: "Delete mail exchanger record"
method: GET
path: "/Email/delete_mx"
tags: ["Email DNS Settings"]
---

# Delete mail exchanger record

`GET /Email/delete_mx`

This function deletes a Mail Exchanger (MX) record. For more information about MX record settings, read our [Email Routing Configuration](https://go.cpanel.net/whmdocsEmailRoutingConfiguration) documentation.

**Important:**

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

## Query parameters

- `domain` string, domain, required
- `exchanger` string, required
- `priority` integer, required

## 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
      - `checkmx` object — An object containing the mail exchanger's data.
        - `changed` 0 | 1 — Whether a change occurred during the function. * `1` - Change occurred. * `0` - **No** change.
        - `detected` 'auto' | 'local' | 'secondary' | 'remote' — The mail exchanger type. * `auto` * `local` * `secondary` * `remote`
        - `isprimary` 0 | 1 — Whether the mail exchanger is the primary mail exchanger. * `1` - Primary. * `0` - **Not** primary.
        - `issecondary` 0 | 1 — Whether the mail exchanger is a secondary exchanger. * `1` - Secondary. * `0` - **Not** secondary.
        - `local` 0 | 1 — Whether the mail exchanger is a local exchanger. * `1` - Local. * `0` - **Not** local.
        - `mxcheck` 'auto' | 'local' | 'secondary' | 'remote' — The mail exchanger type. * `auto` * `local` * `secondary` * `remote`
        - `remote` 0 | 1 — Whether the mail exchanger is a remote exchanger. * `1` - Remote. * `0` - **Not** remote.
        - `secondary` 0 | 1 — Whether the mail exchanger is a secondary exchanger. * `1` - Secondary. * `0` - **Not** secondary.
        - `warnings` string — Warning messages, if any exist.
      - `results` string — A message of success, or an error message. * A message of success that begins with `Removed entry:`. * An error message.
      - `status` 0 | 1 — Whether the function succeeded. * `1` - Success. * `0` - Failure.
      - `statusmsg` string — A message of success, or an error message. * A message of success that begins with Added entry. * 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
    - `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)
