Add event API functionality