reglab/statecodes huggingface dataset:
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1311 - Necessary Defendants.

§  1311.  Necessary defendants.   Each of the following persons, whose
  interest is claimed to be subject and  subordinate  to  the  plaintiff's
  lien, shall be made a party defendant to the action:
1.  Every  person  having  an  estate  or  interest  in possession, or
  otherwise, in the property as tenant in fee, for life, by  the  curtesy,
  or  for years, and every person entitled to the reversion, remainder, or
  inheritance of  the  real  property,  or  of  any  interest  therein  or
  undivided  share thereof, after the determination of a particular estate
  therein.
2. Every person having a right of dower or an inchoate right of  dower
  in the real property or any part or share thereof.
3.  Every person having any lien or incumbrance upon the real property
  which is claimed to be subject  and  subordinate  to  the  lien  of  the
  plaintiff.
4. Where the mortgage is upon any of the public utilities regulated by
  the public service law, the public service commission.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1312 - Representative Defendants.

§  1312. Representative defendants.  1. Where a trust has been created
  by will or by deed or by declaration of  trust,  the  trustees  of  such
  trust  who shall have duly qualified shall be made parties defendant and
  shall represent all  persons  who  are  or  may  become  entitled  to  a
  beneficial  interest in the property or an undivided share thereof or in
  the proceeds of sale thereof under and by virtue of said trust  and  all
  remaindermen  who are or may become entitled to the reversion, remainder
  or inheritance of the property or the proceeds of  sale  thereof  either
  before  or  after  the  termination  of  said trust, without naming such
  beneficiaries or remaindermen as parties  defendant.    Service  of  the
  summons and complaint upon any one of such duly qualified trustees shall
  be sufficient service upon the trust estate and upon all persons who are
  or  may  become  entitled to a beneficial interest in the property or an
  undivided share thereof or in the  proceeds  of  sale  thereof  and  all
  remaindermen  who are or may become entitled to the reversion, remainder
  or inheritance of the property or the proceeds of  sale  thereof  either
  before or after the termination of said trust.
2. Whenever the duly qualified executors under a will are made parties
  defendant they shall represent all of the legatees named in the will and
  the  successors and assigns of such legatees, irrespective of whether or
  not such legacies  are  a  charge  upon  the  real  property,  and  such
  legatees,  their  successors  and  assigns  need not be named as parties
  defendant. Service of the summons and complaint upon  any  one  of  such
  duly  qualified executors shall be sufficient service upon the executors
  under said will  and  upon  all  legatees  named  in  said  will,  their
  successors and assigns, irrespective of whether or not such legacies are
  a charge upon the real property.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1313 - Permissible Defendants.

§  1313.  Permissible  defendants.    Any  person who is liable to the
  plaintiff for payment of the debt secured by the mortgage may be made  a
  defendant  in  the action. The state may be made a party defendant to an
  action for the foreclosure of a mortgage on real property, where it  has
  an  interest  in or a lien on the property subsequent to the lien of the
  mortgage sought to be foreclosed in said action, in the same manner as a
  private person.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1315 - Action by Owner of Junior Participating Interest.

§  1315.  Action by owner of junior participating interest.  An action
  may be maintained by the  owner  of  a  junior  participating  share  or
  interest in a bond or note secured by a mortgage on real, or on real and
  personal  property,  for  the  payment of principal and interest and for
  foreclosure of such bond or note and mortgage in its entirety, or in the
  alternative, subject to the interest of the owner of the  senior  share,
  notwithstanding  that  the  entire  mortgage debt may be due and payable
  according to its terms, in the event that the owner of the senior share,
  to whom is given the right in the  participating  agreement  to  enforce
  such  bond  or  note  and  mortgage  shall fail or refuse to commence an
  action for the enforcement of such bond or  note  and  mortgage  in  any
  manner  permitted  thereby, after ten days' written notice and demand to
  commence any such action, following default in the performance of any of
  the terms and covenants of such bond or note and mortgage.    Upon  such
  failure  or  refusal,  such  junior participant may exercise any and all
  options and remedies provided in such  bond  or  note  and  mortgage  or
  otherwise available to any holder thereof.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1320 - Special Summons Requirement in Private Residence Cases.

§  1320. Special summons requirement in private residence cases. In an
  action to foreclose a mortgage on a residential property containing  not
  more  than three units, in addition to the usual requirements applicable
  to a summons in the  court,  the  summons  shall  contain  a  notice  in
  boldface in the following form:
NOTICE
YOU ARE IN DANGER OF LOSING YOUR HOME
If  you do not respond to this summons and complaint by serving a copy
  of the answer on the attorney for the mortgage company  who  filed  this
  foreclosure proceeding against you and filing the answer with the court,
  a default judgment may be entered and you can lose your home.
Speak to an attorney or go to the court where your case is pending for
  further  information  on  how  to  answer  the  summons and protect your
  property.
Sending a  payment  to  your  mortgage  company  will  not  stop  this
  foreclosure action.
YOU  MUST  RESPOND BY SERVING A COPY OF THE ANSWER ON THE ATTORNEY FOR
  THE PLAINTIFF (MORTGAGE COMPANY) AND FILING THE ANSWER WITH THE COURT.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1321 - Default or Admission.

§  1321.  Default  or  admission.  1. If the defendant fails to answer
  within the time allowed or the right of the plaintiff is admitted by the
  answer, upon motion of the plaintiff,  the  court  shall  ascertain  and
  determine  the amount due, or direct a referee to compute the amount due
  to  the  plaintiff  and  to  such  of  the  defendants  as   are   prior
  incumbrancers  of  the  mortgaged  premises,  and  to examine and report
  whether the mortgaged premises can be sold in parcels and, if the  whole
  amount  secured by the mortgage has not become due, to report the amount
  thereafter to become due. Where the defendant is an infant, and has  put
  in  a  general  answer  by  his guardian, or if any of the defendants be
  absentees, the order of reference also shall direct the referee to  take
  proof  of  the  facts  and  circumstances stated in the complaint and to
  examine the plaintiff or his agent, on oath, as to  any  payments  which
  have  been  made. The order of reference shall also include the name and
  telephone number of the mortgage servicer for a  plaintiff  involving  a
  mortgage foreclosure of a one- to four-family residential property.
2. When he moves for judgment, the plaintiff shall show whether any of
  the defendants who have not appeared are absentees.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1325 - Receiver.

§  1325.  Receiver.  1.  Where  the action is for the foreclosure of a
mortgage providing that a receiver  may  be  appointed  without  notice,
notice of a motion for such appointment shall not be required.
2.  Where  a  receiver has been appointed, upon the application of the
plaintiff or of any holder of  a  certificate  evidencing  an  undivided
interest  in the mortgage or mortgage debt and upon proof that no answer
has been interposed affecting the validity of the mortgage or the amount
due thereon, or asserting any prior lien, or asserting a plea of  tender
of  payment of the amount due, or which if sustained would affect in any
way the right of the plaintiff to a judgment in foreclosure and  to  the
payment  of  the  amount claimed by the plaintiff in his complaint to be
due, the court may direct that the receiver of the  rents  appointed  in
such action apply, during the pendency of the action, the rents received
by him towards the payment of accrued interest on the mortgage, provided
due   provision   shall  have  been  made  for  the  payment  of  taxes,
administration expenses, fees and charges and such reserve as the  court
may  direct.  Any  monies so paid over by the receiver shall be deducted
from the amount of the judgment in said action.
2-a. Where a receiver has been appointed,  the  order  of  appointment
shall  direct the owner or lessee of the mortgaged premises to turn over
to the receiver all security deposits received by such owner  or  lessee
and  shall  further  direct the receiver to hold the security subject to
such disposition thereof as shall be provided in a further order of  the
court  to  be  made and entered in the foreclosure action, in accordance
with the provisions of section 7-105 of the general obligations law.
3. In a city with a population of one million or more persons an order
appointing a receiver to receive the rents and  profits  of  a  multiple
dwelling shall provide that the receiver:
(a)  register  with any municipal department as provided by applicable
law; and
(b) expend rents and income and profits as  described  in  subdivision
two  of  this  section,  except  that  a  priority shall be given to the
correction of immediately hazardous and hazardous violations of  housing
maintenance  laws  within  the  time  set  by  orders  of  any municipal
department, or, if not practicable, seek a postponement of the time  for
compliance.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1331 - Notice of Pendency.

§  1331.  Notice  of  pendency.    The plaintiff, at least twenty days
  before a final judgment directing a sale is rendered, shall file in  the
  clerk's office of each county where the mortgaged property is situated a
  notice  of  the pendency of the action, which shall specify, in addition
  to other particulars required by law, the  date  of  the  mortgage,  the
  parties thereto and the time and place of recording.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1341 - Payment Into Court of Amount Due.

§  1341. Payment into court of amount due.  Where an action is brought
  to foreclose a mortgage upon real property upon which any  part  of  the
  principal or interest is due, and another portion of either is to become
  due,  and the defendant pays into court the amount due for principal and
  interest and the costs of the action, together with the expenses of  the
  proceedings to sell, if any, the court shall:
1.  Dismiss  the  complaint  without  costs  against plaintiff, if the
  payment is made before judgment directing sale; or
2. Stay all proceedings upon judgment, if the payment  is  made  after
  judgment  directing sale and before sale; but, upon a subsequent default
  in the payment of principal or interest, the court  may  make  an  order
  directing  the enforcement of the judgment for the purpose of collecting
  the sum then due.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1352 - Judgment Foreclosing Right of Redemption.

§ 1352. Judgment foreclosing right of redemption.  Where real property
  has  been  sold  pursuant  to  a  judgment  in  an action to foreclose a
  mortgage, and an action is thereafter brought to foreclose or extinguish
  a right of redemption in such real property, the  judgment,  instead  of
  directing  a  sale  of  the  property, shall fix the right of any person
  having a right of  redemption  therein  or  the  right  to  foreclose  a
  subordinate  mortgage  or other lien and shall provide that a failure to
  redeem or commence an action for the foreclosure  of  such  mortgage  or
  other lien within such time shall preclude such person having a right of
  redemption  or  the holder of such mortgage or other lien from redeeming
  such property or foreclosing such mortgage or other lien, and thereafter
  such person having a right of redemption or the holder of such  mortgage
  or  other  lien shall be excluded from claiming any title or interest in
  such property and all title or interests of such person having  a  right
  of  redemption  in,  or the right to foreclose a subordinate mortgage or
  other lien against such  property  shall  thereby  be  extinguished  and
  terminated.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1353 - Conveyance.

§  1353. Conveyance.  1. After the property has been sold, the officer
  conducting  the  sale  shall  execute  a  deed  to  the  purchaser.  The
  plaintiff,  or any other party, may become a purchaser. If the plaintiff
  (or its affiliate, as defined in paragraph (a)  of  subdivision  one  of
  section  six-l  of  the  banking law) is the purchaser, such party shall
  place the property back on the market for sale or other  occupancy:  (a)
  within  one hundred eighty days of the execution of the deed of sale, or
  (b) within ninety days of completion  of  construction,  renovation,  or
  rehabilitation   of  the  property,  provided  that  such  construction,
  renovation,  or  rehabilitation  proceeded  diligently  to   completion,
  whichever   comes   first,   provided  however,  a  court  of  competent
  jurisdiction may grant an extension for good cause.
2. Before a deed is executed to the  purchaser,  the  plaintiff  shall
  file  the  mortgage  and  any  assignment not shown to have been lost or
  destroyed in the office of the clerk, unless it is in a form  which  can
  be  recorded;  in  which case it shall be recorded in the counties where
  the lands are situated; the expense of filing  or  recording  and  entry
  shall be allowed in the taxation of costs; and, if filed with the clerk,
  he shall enter in the minutes the time of filing.
3.  The  conveyance  vests  in the purchaser the same estate only that
  would have vested in the mortgagee if the equity of redemption had  been
  foreclosed.  Such a conveyance is as valid as if it were executed by the
  mortgagor and mortgagee, and, except as provided  in  section  1315  and
  subdivision 2 of section 1341, is an entire bar against each of them and
  against  each party to the action who was duly summoned and every person
  claiming from, through or under a party  by  title  accruing  after  the
  filing of the notice of the pendency of the action.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1354 - Distribution of Proceeds of Sale.

§  1354.  Distribution of proceeds of sale. 1.  The officer conducting
  the sale shall pay, out of the proceeds, unless otherwise directed,  the
  expenses  of  the  sale,  and pay to the plaintiff, or his attorney, the
  amount of the debt, interest and costs, or so much as the proceeds  will
  pay  and  take  the  receipt  of the plaintiff, or his attorney, for the
  amount so paid, and file the same with his report of sale.
2. The officer conducting the sale shall pay out of the  proceeds  all
  taxes,  assessments,  and  water rates which are liens upon the property
  sold, and redeem the property sold from  any  sales  for  unpaid  taxes,
  assessments or water rates which have not apparently become absolute. In
  any  city  having  a population of three hundred thousand or more or any
  city having a population between one hundred  twenty-five  thousand  and
  one  hundred  seventy-five  thousand,  such officer shall pay out of the
  proceeds any liens or incumbrances placed by a city agency upon the real
  property which have priority over  the  foreclosed  mortgage.  The  sums
  necessary  to make those payments and redemptions are deemed expenses of
  the sale. The provisions of this subdivision  shall  not  apply  to  any
  judgment in an action wherein any municipal corporation of this state is
  the plaintiff and the purchaser at the foreclosure sale thereunder.
3.  The  officer  conducting  the  sale after fully complying with the
  provisions of subdivisions one and  two  of  this  section  and  if  the
  judgment  of  sale  has  so  directed  shall  pay  to  the holder of any
  subordinate mortgage or his attorney from the  then  remaining  proceeds
  the amount then due on such subordinate mortgage, or so much as the then
  remaining  proceeds  will pay and take the receipt of the holder, or his
  attorney for the amount so paid, and file the same with  his  report  of
  sale.
4.   All surplus moneys arising from the sale shall be paid into court
  by the officer conducting the sale within five days after the same shall
  be received.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1355 - Report of Sale; Confirmation.

§  1355.  Report  of  sale;  confirmation. 1. Within thirty days after
  completing  the  sale  and  executing  the  proper  conveyance  to   the
  purchaser,  unless such time be extended by the court within said thirty
  days, the officer making the sale shall file with the clerk  his  report
  under  oath  of the disposition of the proceeds of the sale, accompanied
  by the vouchers of the persons to whom payments were made.
2. A motion to confirm such report of sale shall not  be  made  within
  three  months  after  the filing of the report and shall in any event be
  made not later than four months after the filing of such report,  except
  that  if  there  be  no  surplus  moneys  arising  from  the sale of the
  mortgaged premises under such judgment, an application for  confirmation
  of  the  report  of  sale may be made at any time after the report shall
  have been filed eight days. Where the report of sale shows surplus money
  the party moving for confirmation of the report of  sale  shall  present
  with  his  motion papers a proper voucher for the surplus moneys showing
  that they have  been  paid  into  court,  a  certificate  of  the  clerk
  specifying  the notices of claim to the surplus moneys, if any, so filed
  with him, and an affidavit showing any other  unsatisfied  lien  on  the
  property.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1361 - Application for Surplus; Reference.

§ 1361. Application for surplus; reference. 1. Any person claiming the
  surplus  moneys arising upon the sale of mortgaged premises, or any part
  thereof, either in his own name, or by his attorney, at any time  before
  the confirmation of the report of sale, may file with the clerk in whose
  office  the  report  of  sale  is filed, a written notice of such claim,
  stating the nature and extent of his claim and the address of himself or
  his attorney.
2. On the motion for confirmation, or at any time within three  months
  thereafter,  on notice to all parties who have appeared in the action or
  filed claims, on motion of any party to the action, or  any  person  who
  has  filed  a  notice  of  claim  on  the  surplus moneys, the court, by
  reference or otherwise, shall ascertain and report the amount due to him
  or any other person who has a lien  on  such  surplus  moneys,  and  the
  priority  of the several liens thereon and order distribution of surplus
  moneys.
3. The owner of the  equity  of  redemption,  or  any  party  who  has
  appeared  in the action or any person who files a notice of claim or who
  has a recorded lien against the property shall be given notice  by  mail
  or in such other manner as the court shall direct, to attend any hearing
  on disposition of surplus money.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1362 - Payment of Surplus Out of Court.

§  1362.  Payment of surplus out of court. 1. Upon confirmation of the
  report of sale, or upon such proceedings  as  are  provided  in  section
  1361,  the court shall order the payment of the surplus proceeds of sale
  out of court to such persons as are entitled thereto.
2. If the property  sold  has  included  a  right  to  dower,  whether
  inchoate  or  consummate, a tendency by curtesy, or any other estate for
  life or years, the owner of such particular estate in the real  property
  sold  is  entitled  to  receive from the surplus, in satisfaction of his
  estate or interest, either a sum in gross  or  the  earnings  of  a  sum
  invested for his benefit. The determination as to whether a sum in gross
  or  the earnings of a sum invested shall be awarded to the owner of such
  particular estate shall be governed by the  provisions  of  section  968
  with respect to the proceeds of a sale in partition.
3. If real property or an interest in real property which is liable to
  be  disposed  of  as  prescribed  in article thirteen of the surrogate's
  court act, be sold to satisfy a mortgage or other  lien  thereon,  which
  mortgage  or  lien  accrued  during the decedent's lifetime, the surplus
  money shall be paid in to the surrogate's court having  jurisdiction  to
  issue  letters  testamentary or of administration upon the estate of the
  decedent, in the following  cases:  (a)  If  eighteen  months  have  not
  elapsed  since  the  date when letters testamentary or of administration
  were first issued.  (b) If a proceeding for a judicial settlement of the
  accounts of such executor or administrator  has  been  commenced  within
  eighteen  months from the date of the issue of such letters and is still
  pending. (c) If no such letters have been issued and two years have  not
  elapsed since the death of the decedent.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1392 - Foreclosure Actions Involving Abandoned Properties.

§  1392.  Foreclosure  actions  involving  abandoned  properties. If a
  property has been  certified  abandoned  pursuant  to  section  nineteen
  hundred  seventy-one  of  this  chapter,  or deemed vacant and abandoned
  pursuant to section thirteen hundred nine of  this  article,  the  city,
  village,  or  town  in  which  the  property  is  located may commence a
  proceeding in a court of competent jurisdiction in the county  in  which
  the  property  is located to compel any or all mortgagees to: (a) if the
  note is in default, the mortgagee shall commence a foreclosure procedure
  within three months and shall meet all deadlines to ensure the  case  is
  ready to be moved to judgment within a reasonable time period but not to
  exceed  one  year; (b) if a foreclosure has already been commenced, file
  the necessary motions and within three months paperwork to move the case
  to judgment foreclosure within three months; or (c) issue a  certificate
  of discharge of the mortgage within three months and file a satisfaction
  of the mortgage with the appropriate local office.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 13 - Action to Foreclose a Mortgage › 1393 - Mortgages in Default.

§ 1393. Mortgages in default. 1. No local law, ordinance or resolution
  shall  allow  for  the  registration of residential mortgages in default
  prior to a mortgagee filing a notice of pendency in a court of competent
  jurisdiction.
2. No  such  local  law,  ordinance  or  resolution  shall  require  a
  homeowner or occupant to register.
3.  Any  local  law,  ordinance  or  resolution  that  allows  for the
  registration  of  residential  mortgages  in  default   may   impose   a
  registration   fee   not  exceeding  seventy-five  dollars  annually.  A
  mortgagee and/or its agents are prohibited from passing along such  fees
  to the mortgagor in default.
4.  For the purposes of this section, a mortgage default occurs when a
  mortgagor fails to fulfill its obligations under a mortgage agreement.
5. "Registration" shall mean the collection, publication  or  posting,
  public  or  otherwise,  of  residential  mortgages in default by a local
  governing body or an agency thereof,  or  any  third-party  entity  that
  contracts with such local governing body.
6.  "Notice  of  pendency"  shall  have the same meaning as defined in
  section sixty-five hundred one of the civil practice law and rules.
7.  A  local  governing  body,  through  a  local  law,  ordinance  or
  resolution, may impose a fine on a mortgagee for noncompliance with this
  section  or  any  local law, ordinance or resolution that allows for the
  registration of residential mortgages in default. A mortgagee and/or its
  agents are prohibited from passing along such fines to the mortgagor  in
  default.
8.  The  provisions  of  this  section  shall supersede any local law,
  ordinance, or resolution requiring  the  registration  of  mortgages  in
  default that was enacted prior to the effective date of this section.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 15 - Action to Compel the Determination of a Claim to Real Property › 1503 - Action to Determine Claims Where Foreclosure of Mortgage Was Void or Voidable.

§  1503.  Action to determine claims where foreclosure of mortgage was
  void or voidable. When  real  property  has  been  sold  pursuant  to  a
  judgment  in  an action to foreclose a mortgage under article 13 of this
  chapter or pursuant to article 14 of this chapter, or has been  conveyed
  to  the  mortgagee  or the designee of such mortgagee by deed in lieu of
  foreclosure, and  it  appears  from  the  public  records  or  from  the
  allegations  of the complaint that such judgment, sale or conveyance was
  or may have been, for any  reason,  void  or  voidable  as  against  any
  person, including an owner of the real property mortgaged, the purchaser
  or  such  mortgagee or designee, or the successor of any such person, in
  possession of such real property, may maintain an action as provided  in
  this  article  to  determine  the  right of any person to set aside such
  judgment, sale or conveyance or to enforce an equity of redemption or to
  recover possession of the property, or the right of any junior mortgagee
  to foreclose a mortgage. Such action may be maintained  even  though  an
  action  against  the defendant to foreclose the mortgage under which the
  judgment, sale or conveyance was made,  or  to  extinguish  a  right  of
  redemption, would be barred by the statutes of limitation.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 15 - Action to Compel the Determination of a Claim to Real Property › 1511 - Additional Parties.

§  1511.  Additional  parties.  1.  In  an  action  brought under this
  article, the person in possession shall be made a party to  the  action,
  and  when  such person claims the right of possession, or an interest in
  the real property, under another, such other person shall also be made a
  party.
2. Where it appears to the court that a person  not  a  party  to  the
  action  may have an estate or interest in the real property which may in
  any manner be affected by the judgment, the court, upon  application  of
  such  person,  or  of any party to the action, or on its own motion, may
  direct that such person be made a party.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 15 - Action to Compel the Determination of a Claim to Real Property › 1513 - Guardians Ad Litem.

§  1513. Guardians ad litem. If it shall appear by the complaint or is
  otherwise made to appear to  the  court  at  any  time  before  a  final
  judgment,  that  a defendant is or might be an infant, or incompetent to
  manage himself or his affairs, or that a future interest in the affected
  real property has been so limited that as yet there are neither  certain
  nor presumptive owners thereof in being or ascertained, such court shall
  appoint  a guardian ad litem who shall represent and protect such infant
  or incompetent, or the possible interests of the person or  persons  who
  eventually  may  become entitled to such real property or to an interest
  therein under such limitation, and in case of the death  or  failure  or
  inability  of  such  guardian  to act, a successor, who shall appear for
  such infant or incompetent or for  such  possible  interests  until  the
  termination of such action.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 15 - Action to Compel the Determination of a Claim to Real Property › 1517 - Answer.

§  1517.  Answer.  The defendant may, in his answer, deny any material
  allegation of the complaint controverted by him,  or  any  knowledge  or
  information  thereof sufficient to form a belief, or may set forth facts
  constituting a defense; and thereupon he may demand judgment  dismissing
  the  complaint.    He may also set forth facts as a counterclaim for the
  same cause of action; or the defendant may set forth facts showing  that
  he  has  an  estate  or  interest in said property; and thereupon he may
  demand any judgment to which he would be entitled in an  action  brought
  by  him  to recover that estate or to enforce in any manner the interest
  which he asserts in such property; or he may combine any two or more  of
  said demands.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 15 - Action to Compel the Determination of a Claim to Real Property › 1519 - Proceedings.

§  1519.  Proceedings.  1. In an action maintained under this article,
  the proceedings shall be governed by  the  provisions  regulating  civil
  actions, except as otherwise provided in this article.
2.   When  service  of  the  summons  on  any  defendant  is  made  by
  publication, the order for such service shall  direct  that  any  papers
  required  by  such order to be mailed to such defendant shall be sent by
  registered mail, and when such mailing is  required  shall  also  direct
  that  an  affidavit,  by or on behalf of the plaintiff, be filed stating
  that such papers were mailed as required by such order.
3. Whenever a claim of right to immediate possession is in issue,  the
  person  in  possession  shall  be  presumed  to  have  the right to such
  possession, but such presumption may be rebutted.
4. Where any party claims the real property in question, or  any  part
  thereof,  by  virtue  of an estate in reversion or in remainder, whether
  vested or contingent, and the verdict, report, or decision finds that he
  has such an estate, it must specify the time when,  or  the  contingency
  upon which, he will be entitled to possession.
5.  Where  the  complaint  demands,  as  provided  in subdivision 3 of
  section 1515 of this article, that the defendant's dower be  admeasured,
  and  the defendant does not, by her answer, set forth facts showing that
  she is entitled to a greater  right  of  dower,  or  another  estate  or
  interest  in  the  property,  than  that  admitted by the plaintiff, and
  demand judgment therefor, as if she were the plaintiff in an action  for
  dower,  the  court  must render an interlocutory judgment, directing her
  dower to be admeasured, with or without damages for its detention, as in
  an action for dower. The subsequent proceedings shall be the same, as if
  the defendant had, as plaintiff, recovered an interlocutory judgment  in
  an action for dower.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 15 - Action to Compel the Determination of a Claim to Real Property › 1522 - Accounting in Certain Cases.

§  1522.  Accounting  in  certain  cases.  In  an action brought under
  section 1503 the court shall direct such accounting as justice  requires
  in  the circumstances for rents and profits of the property or the value
  of the use and occupation during the period subsequent to  the  original
  sale or conveyance in lieu of foreclosure during which possession of the
  property was held by the plaintiff or by any other party to the action.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 15 - Action to Compel the Determination of a Claim to Real Property › 1523 - Judgment of Foreclosure in Certain Cases.

§  1523.  Judgment  of  foreclosure  in certain cases. 1. In an action
  under section 1503 if it shall appear to the  court  that  there  was  a
  defect  in  the original foreclosure proceedings and such defect was not
  occasioned by the fraud or wilful neglect of the plaintiff, the judgment
  may foreclose or reforeclose the mortgage pursuant to article 13 of this
  chapter, notwithstanding that an action to foreclose the mortgage  would
  otherwise  be  barred;  provided,  however,  that  no  recovery shall be
  granted for any residue of the debt, remaining unsatisfied, if an action
  to foreclose the mortgage would otherwise be barred.
2. If it shall appear to the court in any such action that the  defect
  in the foreclosure proceedings was not due to fraud or wilful neglect of
  the  plaintiff and that the defendant or the person under whom he claims
  was not actually prejudiced thereby, the judgment may  fix  a  time  for
  redemption  of  the property and provide that a failure to redeem within
  such time shall thereafter preclude the  defendant  from  redeeming  the
  property or claiming any right, title or interest therein.
3.  If  a redemption of the property is ordered, the court must direct
  that the value of any improvement to the property made subsequent to the
  original sale or conveyance in lieu of foreclosure  shall  be  added  in
  computing  the  amount  necessary  to  redeem  the premises, in the same
  manner as if the value  of  such  improvements  was  a  portion  of  the
  mortgage debt.
4.  If a new sale of the premises is ordered, the court may include in
  the judgment a provision awarding to the  plaintiff  the  value  of  any
  improvements  to  the  property  made subsequent to the original sale or
  conveyance in lieu of foreclosure, in the same manner as if the value of
  such improvements was a portion of the mortgage debt.
5. The relief provided for in subdivision two of  this  section  shall
  not be granted unless
a. the mortgage was executed after September 1, 1951, or
b. the defendant whose right title or interest will be extinguished by
  failure  to  redeem  the  property within the time fixed by the judgment
  held such right to redeem only by virtue of a  subordinate  mortgage  or
  other  lien,  and  an action to foreclose such right of redemption would
  not be barred at the time this act shall take effect.
The relief provided for in subdivision four of this section shall  not
  be  granted  unless  the improvements were made after September 1, 1951,
  except to the extent that a recovery, allowance  or  credit  for  or  on
  account  of  the  value of any improvements, including improvements made
  prior to the effective date of this act, might be granted, in any  other
  action  or proceeding, to the person maintaining the action provided for
  in section 1503.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 15 - Action to Compel the Determination of a Claim to Real Property › 1531 - Effect of Judgment.

§  1531.  Effect  of  judgment. 1. A final judgment in favor of either
  party,  in  an  action  brought  as  prescribed  in  this  article,   is
  conclusive, as to the title established in the action, against the other
  party,  known  or unknown, including an infant or a person with a mental
  disability, and also against every  person  claiming  from,  through  or
  under  that  party,  by  title accruing after the filing of the judgment
  roll, or of the notice of the pendency of the action, as  prescribed  by
  law;  also  against  each  person  not  in  being  or ascertained at the
  commencement of the action, who by any contingency contained in a devise
  or grant or otherwise, could afterward become entitled to  a  beneficial
  estate  or interest in the property involved, provided that every person
  in being who would have been entitled to such estate or interest if such
  event had happened immediately before the commencement of the action  is
  a party thereto, or that a guardian ad litem is appointed, as prescribed
  by section 1513 of this article.
2. A new trial of said action after judgment shall not be granted as a
  matter of right, but the court may, in its discretion in the interest of
  justice,  grant a new trial upon an application made by any party within
  one year after said judgment. Upon any new trial of an action brought as
  prescribed in this article, the record of the evidence  given  upon  the
  previous  trial  may  be again offered to the court by either party, and
  may be received in evidence, in case the same evidence cannot  be  again
  procured. The courts may make such rules and orders as to preserving the
  record of the evidence given in such actions and perpetuating the proofs
  produced  therein,  either  with  or  without  the awarding of any other
  relief to the party  whose  proofs  are  so  perpetuated,  as  shall  be
  necessary or proper, and may embrace such directions in the judgment.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 15 - Action to Compel the Determination of a Claim to Real Property › 1541 - Article Applies to Corporations and to the People of the State of New York.

§ 1541. Article applies to corporations and to the people of the state
  of New York. An action may be maintained, as prescribed in this article,
  by  or  against  a  corporation,  or  by  or  against  an unincorporated
  association, as if it were a natural person, or such an  action  may  be
  maintained  by  or  against  the receiver or other successor of any such
  corporation or association, or by or against the people of the state  of
  New  York,  and the use of the masculine gender or of the term person in
  this article includes the people of the state of New York.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 16 - Judicial Authorization of Sale, Lease, Mortgage, Acquisition, Exchange or Voluntary Partition › 1601 - Application by Trustee for Court Authorization to Mortgage, to Lease, to Sell, to Acquire or to Exchange Real Property or for Confirmation of a Lease

§ 1601. Application by trustee for court authorization to mortgage, to
  lease,  to  sell,  to  acquire  or  to  exchange  real  property  or for
  confirmation of a lease of real property. 1. When the assets of a  trust
  include an interest in real property, the trustee may apply to the court
  designated  in section 1603, and in the case of a testamentary trust, to
  the court having jurisdiction thereof, for  an  order  authorizing  such
  trustee  to  mortgage,  to lease or to sell such real property or a part
  thereof; or to acquire  land  adjacent  to  such  real  property  or  to
  exchange a portion of such real property for lands adjacent to such real
  property  when either such acquisition or exchange would tend to improve
  the boundary lines of such real property; or to confirm a  lease  for  a
  term  longer  than  ten  years  made  by a trustee of such real property
  without obtaining prior authorization by a court.
2. An application for an order authorizing a trustee to  acquire  land
  adjacent to real property in which the trustee has an interest, or as to
  which  he  has a power of sale, may also be made when such real property
  and the  adjacent  land  to  be  acquired  have  the  same  building  or
  physically connected buildings thereon.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 16 - Judicial Authorization of Sale, Lease, Mortgage, Acquisition, Exchange or Voluntary Partition › 1602 - Application by Owner of Present or Future Interest for Court Authorization to Mortgage, to Lease or to Sell Real Property.

§  1602.  Application by owner of present or future interest for court
  authorization to mortgage, to lease or to sell real property.  When  the
  ownership  of  real  property  is  divided  into  one or more possessory
  interests and one or more future interests, the owner of any interest in
  such real property or in the proceeds  to  be  derived  therefrom  on  a
  directed  sale  thereof,  except the owner of a possessory estate in fee
  simple absolute therein, may apply to the court  designated  in  section
  1603  for an order directing that said real property, or a part thereof,
  be mortgaged, leased or  sold.  If  any  such  owner  is  an  infant  or
  otherwise  under  disability,  the  application can be made on behalf of
  such person, by the person duly  authorized  by  law  to  care  for  his
  property interests.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 16 - Judicial Authorization of Sale, Lease, Mortgage, Acquisition, Exchange or Voluntary Partition › 1603 - Court to Which Application Is to Be Made.

§  1603. Court to which application is to be made. An application made
  pursuant to the provisions of either section 1601 or section 1602  shall
  be made to a term of the supreme court held within the judicial district
  in which the real property, or a part thereof, is situated.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 16 - Judicial Authorization of Sale, Lease, Mortgage, Acquisition, Exchange or Voluntary Partition › 1604 - When Application Shall Be Granted.

§  1604.  When  application  shall  be  granted. The court to which an
  application has been duly made pursuant  to  the  provisions  of  either
  section  1601  or  section  1602 is authorized to grant such application
  upon such terms as to it  shall  seem  proper,  if  satisfied  from  the
  proceedings  theretofore  duly  had,  that  the  act to be authorized is
  expedient; or that  the  lease  sought  to  be  confirmed  is  one,  the
  authorization  of  which  would  be  expedient.  The granting of such an
  application is not necessarily precluded by the fact that it is  opposed
  by  one  or more persons having interests in the affected real property;
  or by the fact that the granting thereof will be in contravention  of  a
  provision  contained  in  the  instrument  creating  some  or all of the
  interests in the affected real property.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 16 - Judicial Authorization of Sale, Lease, Mortgage, Acquisition, Exchange or Voluntary Partition › 1605 - Contents of Petition.

§  1605.  Contents  of  petition.  An application made pursuant to the
  provisions of either section 1601 or  section  1602  shall  be  by  duly
  verified petition which must contain the following:
1.  A  description  of  the  affected  real  property  with reasonable
  certainty;
2. A specification of the rights, shares and  interest  in  such  real
  property, and of the names of the owners thereof, as far as the same are
  known  to  the  petitioner,  together  with  the  facts determining such
  interests and each of them;
3. The special facts alleged to make the granting of  the  application
  proper in accordance with the provisions of section 1604;
4. Any other allegation required by statute, or by rule of court.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 16 - Judicial Authorization of Sale, Lease, Mortgage, Acquisition, Exchange or Voluntary Partition › 1606 - Notice of Application.

§  1606.  Notice  of application. 1. The notice of an application made
  pursuant to the provisions of either section 1601 or section 1602  shall
  be  given  to  each  person in being who has an interest in the affected
  real property, or in  the  proceeds  to  be  derived  therefrom  upon  a
  directed  sale  thereof;  or  who  is  a  beneficiary of a trust created
  relative thereto; or who has a power to appoint  or  to  dispose  of  an
  interest  therein, or in its proceeds; or who is an appointee under such
  a power theretofore exercised.
2. Such notice shall be given in the manner following:
a. If such person is a competent adult within this state,  by  service
  upon  him  personally  of  a  written notice stating the time, place and
  purpose  of  the  application,  at  least  eight  days  prior   to   the
  presentation thereof;
b.  In  all  other  cases  in  such  manner  as  the  court  which the
  application is to be made shall prescribe.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 16 - Judicial Authorization of Sale, Lease, Mortgage, Acquisition, Exchange or Voluntary Partition › 1607 - Service of Notice Upon Presumptive Members of Class.

§  1607. Service of notice upon presumptive members of class.  When an
  interest in the affected real property has  been  limited  to  a  class,
  service of the notice of the application upon those persons in being who
  are  the  presumptive  members  of  such class at the moment immediately
  before the application is made shall be sufficient service  as  to  such
  interest.  If  no  such  presumptive  members  of  the  class exist, the
  provisions of section 1608 apply.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 16 - Judicial Authorization of Sale, Lease, Mortgage, Acquisition, Exchange or Voluntary Partition › 1608 - Guardians Ad Litem.

§  1608.  Guardians  ad litem. 1. On the return day of the motion made
  pursuant to the provisions of either section 1601 or  section  1602  the
  court  shall  appoint  a guardian ad litem for any minor or other person
  under disability who is a party to the proceeding and is not represented
  by a duly acting guardian, committee or conservator.
2. On the return day of the motion made pursuant to the provisions  of
  either  section  1601  or  section  1602,  if  it  appears that a future
  interest in the affected real property has been so limited that  as  yet
  there  are  neither  certain  nor presumptive owners thereof in being or
  ascertained, the court shall appoint a guardian ad  litem  to  represent
  and  to  protect  the  possible  interests  of the person or persons who
  eventually may become entitled to such real property, or to an  interest
  therein,  under  such  limitation. The granting of an application is not
  necessarily precluded by the fact that as yet no person other  than  the
  applicant  is  in  being,  who  can  acquire  a beneficial or possessory
  interest in the affected real property.
2023 New York Laws › RPA - Real Property Actions and Proceedings › Article 16 - Judicial Authorization of Sale, Lease, Mortgage, Acquisition, Exchange or Voluntary Partition › 1609 - Final Order Upon the Application.

§  1609.  Final  order upon the application. After taking proof of the
  facts, either before the court or a referee, and hearing the parties and
  fully examining into the matter, the court must make a final order  upon
  the application. In case the application is granted in whole or in part,
  the final order shall specify the real property to be mortgaged, leased,
  sold,  acquired,  exchanged or as to which a previously made lease is to
  be confirmed, and the terms and conditions  upon  which  the  authorized
  transaction is to be consummated or approved.