For many of us, subletting was the first step to becoming a New Yorker, even if that meant renting a spare closet in a six-story walk-up in Bushwick. After all, the average one-bedroom apartment in Manhattan costs $3,440 a month, and deals can often be found by filling empty bedrooms in already-rented apartments.

Short-term rentals are extremely popular in the city, whether you call them Airbnbs or sublets. But after the state’s multiple dwelling law went into effect in 2011, a lot of them became illegal. For a sublease to be protected under New York City law, the arrangement must last for a minimum of 30 consecutive days.