API 429 Response when adding domains

I am trying to add a clients domains into CloudFlare via API. After about 300 calls, or 50 domains installed, the API returns a 429 response which to me means too many requests/rate limited. Then I have to wait an hour (or more) to add more.

Something seems not right here?

All nameservers are already changed over, the delay was set so that there were only 12 API actions per minute - yes 12!

Why am I seeing this 429 response with such few actions when the rate limit supposedly allows for 1200 calls within 5 minutes.

Running API via Python requests using Global API key.
Jump_Start is off, I add 4 DNS - adding 2 domains per minute.

Any and all help is appreciated.

I am getting a 429 API Response when trying to add domains in bulk. I have used both a bearer token and the global API token, after 50 domains I receive a 429 error when trying to add a domain. I stay well under the 1200 API calls within 5 minutes, but I still get rate limited and have to wait an entire hour to start again. My client has 600+ domains that they would like to add, and as of right now the only way for it to go smoothly is to allow a 30 second delay after 6 API calls. Maybe I should take another approach or is there a way to avoid this rate limiting 429 error. Thank you.

Also, all nameservers have been changed to cloudflare NS prior to API requests and jump_start is set to false.

This is in reference to ticket number: #2193810

Sorry for the issues you facing. We do have different rate-limits for some endpoints and I suspect you are hitting one of these file the adding new zones endpoint. I’ve contacted you via your support ticket to understand your use case - but the answer here may be not to bulk add so many zones in short intervals.

@Damian will that work at all? Do you not have to add the zone to CF, and then change the Nameservers, regardless of jump_start.

For the most part I get the nameservers from CF and then provide them to a client and they use those nameservers. That has worked fine so far.

It’s this rate limit I have hit when adding zones.

Working with Damian via a support ticket to resolve and see my options at the moment.

Just for anyone stumbling across this topic - this is a known limit documented here

Adding Multiple Sites to Cloudflare via Automation

If you attempt to add more than 50 domains at a time, any additional domains will be blocked until they are processed.

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