Added sendmessage api.