Add MX records via API


#1

Hi,
I can not add the MX record in a Zone from the API of my domain name exetat.com. I’m using PHP sdk with this statement

$dns->addRecord(‘a07e52c68721e…’, ‘MX’, ‘@’, ‘mxa.mailgun.org’, 0, false, ‘10’)

And as a result (incomplete by the way)

    GuzzleHttp/Exception/ClientException with message 'Client error: `POST https://api.cloudflare.com/client/v4/zones/a07e52c68721e.../dns_records` resulted in a `400 Bad Request` response:
{"success":false,"errors":[{"code":1004,"message":"DNS Validation Error","error_chain":[{"code":9104,"message":"priority  (truncated...)

Any help is welcome