Add handler for events endpoint.