endpoint based on mode