api correctly responds to a valid post request