adds api endpoint to create event