received and sending api messages