The DNS management of Freenom is not that intuitive and it does not support API to automate dns record changes.

This is where Cloudflare shines. Cloudflare’s DNS management is faster and easier than Freenom and it also has API support to automate DNS management.

Move the DNS name server from freenom to Cloudflare

Create a free account on cloudflare

After logging in to cloudflare it will ask to add the domain. Once the domain is registered it may take some time for cloudflare to detect the domain, if you get an error, please wait for 30 mins and try to add the domain name again.

Add an A record in the next page where cloudflare asks to add a dns record and click Continue.

Once domain is added cloudflare will give 2 nameservers to add to freenom to migrate the dns management. Add these 2 name servers in your freenom account in your domain management under Management Tools >> Nameservers

On cloudflare click Done, Check Nameservers button. It will take 5 mins to 30 mins for the nameservers to update, cloudflare will send an email once the nameserver is active and the domain is added to cloudflare

Once the domain name is activated in cloudflare the dns entries can be added in DNS tab under the domain name in cloudflare