added post functionality to api