Adding new host via API

Hey, I want to set up autoscaling solution for my Pritunl setup on cloud which will create new server in case of crash.
I’d like to automate the process of adding new host to the VPN server via API instead of doing it manually in web UI, so I’m looking for some methods that will allow me to programmatically update Public Address oraz Sync Address fields of specific Host and then do Attach Host action for each of my VPN servers. Where can I find documentation for this?

This would all need to be done with the API use Chrome Developer Tools to find the correct usage for the API.