send events to API