# Adding new host via API

**URL:** <https://forum.pritunl.com/t/adding-new-host-via-api/1212>\
**Category:** Pritunl VPN\
**Tags:** pritunl\
**Created:** [July 12, 2023, 11:52am UTC](https://forum.pritunl.com/t/adding-new-host-via-api/1212 "2023-07-12T11:52:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![claire12](https://forum.pritunl.com/user_avatar/forum.pritunl.com/claire12/32/501_2.png) [@claire12](https://forum.pritunl.com/u/claire12)\
**Post date:** [July 12, 2023, 11:52am UTC](https://forum.pritunl.com/t/adding-new-host-via-api/1212/1 "2023-07-12T11:52:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [July 12, 2023, 9:33pm UTC](https://forum.pritunl.com/t/adding-new-host-via-api/1212/2 "2023-07-12T21:33:13Z")

</div>

This would all need to be done with the [**API**](https://docs.pritunl.com/docs/api) use Chrome Developer Tools to find the correct usage for the API.
