finish alert api