How to create some certain dns records using API

Is there any API that should be customizable. for instance I want to create only 4 records namely:
1- A for mail with content ( IP)
2- A for www with content ( IP)
3- A for domain name with content ( IP)
4- MX for mail with content (mail.domain Name)
so how can i add them using API.

currently I use this API ""

which creates multiple record but no www record and no A record for root domain.
so it does not work for me.
any help appreciated.

Individual DNS records can be created with this API call:

Thank you for the response.
That is right but I am looking for an API that create multiple records for a domain by one call.
As I mentioned above, I need all those 4 records to be added under my domain name with one API call. The API that you mentioned is working for one record with the specific zone id only. If i have to create four records then i have to call it 4 times which i dont think should be the right way.

That got me thinking. How about this (Import BIND file):

1 Like

This BIND config file is a static file but I am looking for a solution to make it dynamic.
because after each domain registered an hosted then i wanna call the cloudflare API for that specific domain and add all those records as i mentioned above.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.