Fix the endpoint for API.