This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Parent Request to https://api.cloudflare.com/client/v4/zones/**zone_id**/dns_records?type=mx,txt,cname,srv | |
const current_zone = ''; //Zone ID | |
const verify_code = ''; //value from the hosted-email-verify TXT entry supplied by Migadu | |
const host = ''; //Hostname | |
const cloudflare_token = ''; //Cloudflare API Token | |
const base_url = 'https://api.cloudflare.com/client/v4'; | |
const dns_records_url = base_url + '/zones/' + current_zone + '/dns_records/'; | |
request = {header: {"Authorization" : "Bearer " + cloudflare_token,"Content-Type" : "application/json"}}; | |
const updates = [ |