add post method to the api, fix #1