DELETE all records using API



Currently I am trying to automate the move of many domains from an existing DNS service provider to Cloudflare. I am using the API to do this:

The problem I encounter is that when I add a new zone via the API then it automatically queries its current DNS settings and adds them into Cloudflare.

Is it possible to change this behavior so when a new zone is added it gets added with no records at all? Or is there an API call that I can use to DELETE all current records rather than one by one?

Please let me know.
Thanks in advance.


Hey there,

There isn’t a bulk delete call, I’m afraid. However, you should be able to script this.
List the DNS records, filter for the ID and pass that into the delete call.
Hope this helps.



Too bad. Then I guess I will have to do the lookup first.



If you add the zone via API I believe you can tell us not to scan existing records:

Set jump_start to false. Obviously at that point you’re on the hook for creating whatever DNS records need to be created in your zone (via API, BIND file import or manual creation).




Thanks!. That is exactly what I was looking for.


Me again,

What if I am using the host API at with a account?

I tried to pass the -d ‘jump_start=false’ to but that did not do anything

Please let me know


Hmm… I don’t see it listed in our internal docs either. We are working on improving parity/ consolidating some APIs to make things easier for partners and this may be on the list.

Course I could also be just flat out wrong, I’d recommend pinging support to see if they have a better answer. They’re way smarter than I am when it comes to the partner APIs. :wink: