send and receive messages and API integration