Change TTL by API

I have over 80 DNS zones, and lots of notes!

Most have TTLs from different periods, however, I need to change them all at once, to avoid a lot of work and errors.

I need to leave them all for 5min or auto.

How can I do it? It’s possible?

To change the TTL for all DNS records using Cloudflare’s API. Follow these steps:

  1. Retrieve all DNS record IDs using the List DNS Records API for each zone.
  2. Iterate through each DNS record and use the [PatchDNS Record API](Cloudflare API Documentation to change the TTL to 5 minutes (300 seconds) or set to “Auto” by setting the TTL value to “1”.

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