In New York your landlord must return a tenant’s security deposit when you terminate your tenancy or within a "reasonable timeframe". There is no specific number of days but the New York courts have often interpreted this timeframe to be within 21-45 days after the tenant has moved out. The landlord can use the security deposit for reimbursement for unpaid rent or for the cost of any repairs that are beyond the normal wear and tear and for damages caused by the tenant. In New York a tenant does not have to officially request the deposit be returned, but to avoid any disputes it's always a good idea to document your request. The HomeTitan Request For Deposit Return Letter clearly states the law and your desire for a full return, and does so with a tactful yet professional tone. Send it via certified mail (return receipt requested) to establish the delivery date and keep a copy for yourself. Usually our letters are all it takes for a landlord to make full payment, but in the unlikely situation where it does not this record is essential.
Remember, if you have left the apartment in a clean condition with no damages and no unpaid rent you landlord is obligated by law to return the deposit.