Adding events API.