Cloudflare: Disable IPv6 for all zones

CF_AUTH_EMAIL=my@email.com
CF_AUTH_KEY=abcdef

curl -H "X-Auth-Email: $CF_AUTH_EMAIL" -H "X-Auth-Key: $CF_AUTH_KEY" \
    "https://api.cloudflare.com/client/v4/zones?per_page=50" |
jq -r '.result[] | .id' |
while read id; do
    for setting in ipv6 opportunistic_onion; do
        curl -H "X-Auth-Email: $CF_AUTH_EMAIL" -H "X-Auth-Key: $CF_AUTH_KEY" \
            -X PATCH \
            "https://api.cloudflare.com/client/v4/zones/$id/settings/$setting" \
            -H 'Content-Type: application/json' \
            --data '{"value":"off"}'
    done
done

Should you have more than 50 zones, you will have to implement pagination. This is left as an exercise for the reader.