Backend for reset api key feature