the API might be of use here, specifically this [1] endpoint, in combination with the pmgsh [2] tool. There's a few commands floating around in this [3] thread which might serve as an inspiration, although you'll need to adapt the actual endpoints used.
@nunner thanks!
I got this:
pmgsh create /config/whitelist/ip --ip 'ip address'
or
for ip in `cat ips.txt`; do pmgsh create /config/whitelist/ip --ip "$ip"; done
I also recommend learning how to remove them quickly with a script for the same reason.
Have used this method for other things and there are times you need to remove a batch of them.