Change Wifi network from API

Hi!

I’m creating an android app for volumio and I’m trying to find a way to change the wifi that volumio is connected from hotspot to another network. The volumio web app has the option in Settings/Network. I wanted to know if there is a way to change the network, that is, for example to select my home wifi network and enter the password trough an API call or something similar.

Any help you could give would be greatly appreciated!

Thank you and have a nice day.