DELETE - Delete a specific MX record in a zone

Purpose

This API call removes a Mail Exchange (MX) record from a specified DNS zone. MX records determine which mail servers handle email delivery for a domain. Deleting an MX record can impact the ability to send and receive emails associated with that domain. This API provides precise control over email routing, helping network administrators manage mail server configurations effectively and securely.

Note: Deleting an MX record without a replacement can disrupt email delivery, causing emails to bounce or fail.

Ensure there is at least one valid MX record left in the zone to maintain email functionality.

Verify mail server settings before making changes to avoid unintended downtime or delivery issues.

If migrating email services, update MX records instead of deleting them prematurely.

Request URL

Method: DELETE

https://{appconsole_IP}:{9443}/api/dns/zone/{zone_pk}/MX/{pk}/

Request Headers

The following headers must be included in the API request for successful authentication and data submission:

Authorization: DDI Central's OAuth implementation uses the Bearer authentication scheme. Hence, while making API calls, access_token obtained via the OAuth 2.0 Client Credentials Grant must be included in the Authorization header of API requests. This token verifies the client’s identity and ensures appropriate permissions for accessing resources.

The Authorization Header follows the format below:

headers = { "Authorization": "Bearer {bearer_tk}" }


Content-Type: Required in the header to indicate the media type of the resource being sent. It helps the server at the receiving end understand how to process the transmitted request body.

The Content-Type Header follows the format below:

headers ={ "Content-Type": "application/json" }

Path Parameters

  • zone_pk* long
    • The unique identifier of the DNS zone where the MX record exists.
    • Example: 5867.
  • pk* long
    • The unique identifier of the MX record to be deleted.
    • Example: 6460.

 

- Mandatory parameter.

 

Sample Response

Copied
  {
  "message":"Deleted successfully"
  }