Fix api endpoint URLs