I agree with my fellow attorneys and think the practical answer is "no". If they have to get a warrant, they're liable to just be angry with you and poison your future relationships with them when you have to go back to them periodically for "certificates of occupancy", building permits, stop work order removals, fire safety or code compliance checks, etc.
If you have done something against the zoning law/codes, best thing is to fess up, profess ignorance and plead for understanding/mercy. Get a lawyer if there are grey areas or defenses or throw your contractor under the bus if you had one. You don't want to appear intentionally non-compliant and not letting the inspectors in is circumstantial evidence you know you did something is wrong.
When you're digging yourself into a hole, the first thing is to stop digging. Everyone, even code inspectors, prefer people making "honest mistakes" than "deliberately breaking the law". When it comes to possible fines and sanctions, this will also enter into their thinking. You need to be as friendly with these people as possible, no matter what the libertarians might tell you about "your constitutional rights".
This answer is provided under the Avvo.com “Terms and Conditions of Use” (“ToU”), particularly ¶9 which states that any information provided is not intended as legal advice or to create an attorney-client relationship between you and me or any other attorney. Such information is intended for general informational purposes only and should be used only as a starting point for addressing your legal issues. In particular, my answers and those of others are not a substitute for an in-person or telephone consultation with an attorney licensed to practice in your jurisdiction about your specific legal issue, and you should not rely solely upon Legal Information you obtain from this website or other resources which may be linked to an answer for informational purposes. You understand that questions and answers or other postings to the Site are not confidential and are not subject to attorney-client privilege. The full Avvo ToU are set forth at http://www.avvo.com/support/terms . In addition, while similar legal principles often apply in many states, I am only licensed to practice in the State of New York and Federal Courts. Any general information I provide about non-New York laws should be checked with an attorney licensed to practice in your State. Lastly, New York State Court rules (22 NYCRR Part 1200, Rule 7.1) also require me to inform you that my answers and attorney profile posted on the Avvo.com site may be considered "attorney advertising" and that "prior results do not guarantee a similar outcome".
Dear Jamaica Home Owner:
You are skating on thin ice if you have an illegal basement apartment and block an inspection.
You need an attorney.
The city is vigorously cracking down on landlords particularly in Queens with illegal three-unit dwellings.
In addition to renting a residence that is not on the certificate of occupancy, (the landlord does not have a legal right to collect rent from the tenant in the basement apartment [your own tenant could have turned you in]) the landlord is also in violation of the New York State Multiple Dwelling Law because the building is now a multiple dwelling and not registered as a multiple dwelling with the Office of Code Enforcement (NYC HPD.)
A landlord should be familiar with the potential high cost (thousands of dollars) in altering a building without prior approval, use in violation of the existing certificate of occupancy, and more as you will see from the chart.
The inspectors will get in at some point, and the book on the fines is open for any landlord to check out:
So if you have a desire to not lose your building and not to spend a fortune on penalties you may consider that hiring an attorney to assist you with your illegal dwelling may be more cost effective that having an illegal apartment in your two-family home.
The answer provided to you is in the nature of general information. The general proposition being that you should try to avoid a bad outcome if you can.
Everyone answering is correct. The harder you make it on the town/city, the more you can expect your fines and retribution to be.
If you found this "helpful" or "best answer," please click it with my appreciation. My response is for educational purposes and does not constitute legal advice nor creates an attorney client relationship which requires all the details and a personal conference.