Find out what constitutes as a illegal apartment. If you’re wondering if your apartment is illegal, you can check with the Department of Buildings. All buildings built after April 1929 have a certificate of occupancy which will tell you the ways the building is permitted to be used.