sending to correct api endpoint path