Make API Endpoint dynamic