Toggle HTML endpoint and api