implement api folders and emails (api/{resources}/get)