API actions from within HTML content