Fix broken API endpoint