It’s better to explain more about your issue. Generally, there are two ways to handle this:
- Open the connection (socket) from the ESP32, and do not close that link, so the data can be transmitted through the socket.
- Define an endpoint in your API. On the ESP, you can check it periodically.