While you can manage your Floating IPs using the Control Panel, the same functionality is also available in the DigitalOcean API with the added benefit of allowing you to programmatically make changes.
See the API documentation on Floating IPs for more information.
doctl documentation on Floating IPs for more information.
A floating IP alone does not automatically provide high availability. For a setup to be highly available, you need to implement a failover mechanism, which automates the process of detecting failures of the active server and reassigning the Floating IP to a passive server.
Here are several tutorials that will walk you through the creation of various active/passive high availability setups. Each tutorial uses a different software solution to achieve HA, so choose the one that is the best fit for your needs.