A plaintiff may voluntarily discontinue an action by serving and filing a notice of discontinuance, by filing a written stipulation that is signed by the parties' attorneys of record, or by obtaining a court order discontinuing the action.
Bank of Am., N.A. v. Ali, NY Slip Op 00838 (2d Dep't February 9, 2022)