N.Y. Criminal Procedure Law § 620.20
1. A material witness order may be issued upon the ground that there is reasonable cause to believe that a person whom the people or the defendant desire to call as a witness in a pending criminal action:
2. A material witness order may be issued only when:
3. The following courts may issue material witness orders under the indicated circumstances:
4. Unless vacated pursuant to section 620.60, a material witness order remains in effect during the following periods of time under the indicated circumstances: