Script to send post request to api