added POST code to api