alert api implementation