updating api endpoint