In New York City, if your building has three or more apartments or rooms that are separate living quarters for you and other tenants, legally it must be registered as a multiple dwelling. Sometimes owners of small properties do not comply with this requirement to escape a range of costs associated with formal registration.
For example, some legal two and three-family homes have tenants in illegal rentals of attics and basements, which have been converted into apartments. If you live in a unit like this and have a dispute with the landlord, especially when there are unsafe conditions, it can give you some leverage.
Showing the court that the property has an illegal rental, and you didn't know it when you moved in, can persuade a judge to decide that you don't owe rent. Housing Court may dismiss the landlord's case because the property is a "de facto multiple dwelling," meaning that facts indicate it falls within the legal classification of a multiple dwelling, but is not registered as one.
As a practical matter, this can buy you time and save some rent costs. But the landlord will then probably register the property as a multiple dwelling and sue you again in Housing Court, or bring the case in State Supreme Court.
Once any registration requirements are met and violations are corrected, you will start to owe rent, which the landlord can initiate a non-payment suit to collect, and possibly evict you. Even if the lawsuit isn't successful, you may eventually face loss of your lease, because if your apartment isn't rent-stabilized, the landlord isn't obligated to renew it. Buildings with less than six units generally aren't rent-regulated.