Bulk Redirects question

Hey! I need help with setting up bulk redirects!

I tried to do it with Python and Cloudflare API, but I got a 400 status error is there a way I could add a forwarding page rule in bulk, cause at the moment we’ve over 300 domains in Cloudflare and to do it one by one would be quite impossible! I am open to doing it in any way possible!

Can you share your code to setting up bulk redirects