added apis for messages