How to control a device via a web interface in HA?

Hi all,
I want to control a device (esp32 based) via a web interface because it should be controlled by other means that HA.
So is it possible to have HA communicate through a web interface (using GET/POST requests basically) to control a device?
TIA

Sure.

OK great I will have a look!
Thx

Note that you can also just enable both web_server for the webui, and api for the HA part.