A function to send messages from back-end to users, in a custom GPT setup?

On one side, I have the custom gpt interacting with users.
On the other side, I have the back-end of my app powering the custom GPT via API.

I would need to write a function for the back-end that sends messages to the custom GPT to be displayed to the user. And, another function to get the answers back from users, using the custom GPT chat interface, and receive them in back-end of my app.

Any wise one around to help?