add server API to get/save chat history