Loading...

Knowledge Base

Modify MX Records Using the API

When you want to update a Mail Exchanger (MX) DNS record. This article explains how to modify MX records for a domain using the API, including mail server values, host settings, TTL configuration, and priority management.

Modifying MX Record

Description

Modifies a Mail Exchanger (MX) record.

Parameters

NameData TypeRequired / OptionalDescription
auth-useridIntegerRequiredAuthentication Parameter
api-keyStringRequiredAuthentication Parameter
domain-nameStringRequiredDomain name for which you want to modify the MX record
current-valueStringRequiredCurrent MX value
new-valueStringRequiredNew MX value
hostStringOptional

The host part of the domain-name for which you need to modify an MX

Example:

You may send this as "mail", if u wish to modify the MX record as mail.domainname.com. By default it will be "@".

ttlIntegerOptionalNumber of seconds the record needs to be cached by the DNS Resolvers. Default value is 14400.
priorityIntegerOptionalThe Priority of the MX record

HTTP Method

POST

Example Test URL Request

https://test.httpapi.com/api/dns/manage/update-mx-record.json?auth-userid=0&api-key=key&domain-name=domain.asia&current-value=mail.domain.com&new-value=mail1.domain.com

Response

Returns "Success" as the status of the response if the record is modified successfully.

In case of any error, an "error" key with error description (as value) will be returned.