document alert API with usage examples