Create and update events from the API.