API to update mail exchanger record docs

swbrains

Well-Known Member
Sep 13, 2006
272
37
178
In the cPanel API docs here:
Update Mail Exchanger Record
Endpoint: /Email/change_mx

it says as a description:
"Update mail exchanger record
This function creates a Mail Exchanger (MX) record. For more information about MX record settings, read our Email Routing Configuration documentation."

Is this correct? The calling parameters refer to an "olddomain", and since it's an "update" function, shouldn't it be "replacing" an existing MX record? It seems there is also another function that specifically creates a new MX record (Endpoint: /Email/add_mx ).

Is it safe to assume that "change_mx" will delete the MX record specified by the "oldexchanger" and "oldpriority" parameters and then add a new one based on the "exchanger" and "priority" parameters provided?

Thanks!