Adding multiple websites with CURL

Hello guys,

I’m trying to add multiple websites to Cloudflare using curl but guess I’m doing smth wrong. I’ve read that article Adding Multiple Sites to Cloudflare via Automation – Cloudflare Help Center and tried to run that code:

for domain in $(cat domains.txt); do \ curl -X POST -H “X-Auth-Key: myAccessKey” -H “X-Auth-Email: myEmail”\ -H “Content-Type: application/json” \ “” \ – data ‘{account": {“id”: “myAccountId”}, “name”:"’$domain’",“jump_start”:true}’;done

So I need to understand whow curl will know what is “domain” (it supposed to be each single line of the file). And there are also few things I’m not sure about. 1st - I’ve generated Access Key with
Permissions Zone - DNS - Read and I’m not sure if it’s correct as I need to delete any existing records for domains and put own A record. 2nd - Where I should find my Account id? Not sure if I choose the right one.

Thanks everyone for the help!

A post was merged into an existing topic: Adding multiple sites with CURL