Statute: N.Y. Lien Law § 10
Notice deadlines before the lien, and the lawsuit deadline after it, are on the New York page. Those dates depend on who hired you and the kind of property.
This answer is the New York rule only. Lien deadlines are different in every state.
This is general information, not legal advice. Rules change. Check the current statute or ask a construction attorney in that state before you rely on a date. Job Clock does not file liens, mail notices, pull permits, or give legal advice.