API so that you can send commands to the application from the outside

Something like an API so that you can send commands to the application from the outside. For example, then the following interaction option would be possible: in HomeAssistant, integration that allows you to display messages or requests on the HomeHabit application, or control the application (switch dashboards, or change some parameter).