implement alerts api