Code Enforcement NYC: How to Get Your Building Inspected (2026)

✓ Law Verified September 29, 2026

Code enforcement NYC is how tenants get the city to inspect a building and order repairs. If your heat is out, the ceiling is leaking, or mice are everywhere, this can be fixed, and the law is on your side. You don’t need a lawyer to start. In most cases, you only need a free 311 complaint and a little patience. As a result, code enforcement NYC can put official violations on your landlord’s public record, often within days.

The short answer: Start by telling your landlord about the problem in writing. Then file a complaint with 311 online, by app, or by phone. That sends your complaint to the NYC Department of Housing Preservation and Development (HPD). HPD may call your landlord and then send an inspector. Code enforcement NYC is free, and your landlord cannot legally punish you for using it. If the landlord still won’t fix the problem, you can take them to Housing Court with an “HP action.”

Code Enforcement NYC: What the Law Says

New York State law gives every tenant a “warranty of habitability.” This means your home must be safe and livable. It must also be free of conditions that put your health at risk. You can read the rule in New York Real Property Law § 235-b. Cornell explains the idea in plain English on its warranty of habitability page.

Advertisement

In the city, the NYC Housing Maintenance Code adds specific rules. HPD handles code enforcement NYC for most private apartments. It sorts problems into three classes. Each class has its own deadline for repairs. For example, a missing smoke detector is treated as more urgent than peeling paint in a hallway.

Heat rules are just as specific. From October 1 to May 31, landlords must keep indoor temperatures at 68°F during the day (6am to 10pm) if it drops below 55°F outside. At night (10pm to 6am), indoor temperatures must stay at least 62°F, no matter how warm or cold it is outside. Hot water must reach 120°F all year. Code enforcement NYC treats a heat outage as an emergency.

Violation type Examples Landlord’s deadline to fix Civil penalty range
Class A (non-hazardous) Minor leaks, missing signs, small paint issues 90 days $10–$50 per violation
Class B (hazardous) Missing locks, no lighting in halls, mice or roaches 30 days $25–$100, plus $10 per day
Class C (immediately hazardous) No heat, no hot water, rats, no smoke or CO detector 24 hours $50–$150 per day (buildings with more than 5 units: $100–$150 per day)
Class C (lead paint or window guards) Peeling lead paint where a child under 6 lives, missing window guards 21 days $50–$150 per day, or more
Heat and hot water Heat below legal minimum during heat season 24 hours $250–$500 per day (first); $500–$1,000 per day (repeat)

What to Do Right Now: Code Enforcement NYC Step by Step

Code enforcement NYC works best when you follow the steps in order. Here is the typical path:

1. Tell your landlord or super in writing. A text or email is fine for now, but save it. 2. File a 311 complaint. Use the NYC 311 online portal, the 311 app, or call 311. Write down your complaint number. 3. Stay reachable. HPD may call you to check whether the problem was fixed. If you don’t answer, the complaint may be closed. 4. Be home for the inspector. If nobody lets them in, the inspector may leave without writing anything up.

5. Check the results. Look up your building on HPD Online. You can see open complaints and violations for free. However, HPD may close a complaint if your landlord says the work is done. If the problem is still there, file a new complaint. Typically, code enforcement NYC gets stronger with every complaint on record.

Heat season runs October 1 to May 31. If your heat is out, file a 311 complaint the same day. Class C heat violations give your landlord only 24 hours to fix it. Complaints filed quickly create the strongest record.

How to Protect Yourself in Writing

Paper trails win arguments. Keep a simple log with dates, times, and what went wrong. For heat problems, write down your indoor temperature each morning and night. Take photos and short videos with timestamps. Also save your 311 complaint numbers. A good record makes code enforcement NYC much harder for a landlord to dodge.

Send a formal repair letter by certified mail with a return receipt. Keep a copy for yourself. List each problem, when it started, and ask for repairs by a clear date. For example: “The bathroom ceiling has leaked since September 2. Please repair it by October 15.” Be calm and factual. Judges notice tone.

You are protected from retaliation. Under New York Real Property Law § 223-b, a landlord cannot evict you, raise your rent, or cut services because you complained. If this happens within one year of your complaint, the law usually assumes it is retaliation. Your code enforcement NYC records help prove your case.

When to Get Help (Legal Aid or an Attorney)

Sometimes a landlord ignores every violation. When that happens, you can start an HP action in Housing Court. This is a case asking a judge to order repairs. The court’s HP action page explains how to file. In most cases, HPD inspects again before your court date. As a result, code enforcement NYC and the court work together.

Get help right away if you receive eviction papers. Also get help if your gas is shut off, or if you are locked out. New York City’s Right to Counsel program gives free lawyers to many tenants facing eviction. Call 311 and ask for the Tenant Helpline. You can also call Housing Court Answers at (212) 962-4795.

For free legal help, search LawHelpNY for a local legal-aid office. A tenant attorney can explain your options for rent reductions or repairs. They cannot promise an outcome, but they know the system. Bring your code enforcement NYC records to your first meeting.

📨 Get Free Tenant Rights Guides Alerts

Free · No spam · Unsubscribe anytime

Frequently Asked Questions

How long does code enforcement NYC take to send an inspector?

It depends on the problem. Heat and hot water complaints are handled first, often within a few days. Less urgent complaints can take weeks, so file early and keep following up.

Can I withhold rent while I wait for code enforcement NYC?

You may be able to, but it is risky. If you hold back rent, set the money aside, because a landlord can sue for it. Talk to a local legal-aid office before you stop paying.

Does code enforcement NYC cover public housing (NYCHA)?

HPD mostly inspects private buildings. NYCHA tenants should report repairs to NYCHA first, then use 311 if nothing happens. NYCHA tenants can also bring an HP action in Housing Court.

Bottom line: You have a right to a safe, warm, working home. Code enforcement NYC is free, and it is built for tenants like you. Put everything in writing, call 311, and reach out to legal aid if your landlord still won’t act.

Protect your stuff while you sort this out

A landlord’s insurance does not cover your belongings — renters insurance does, often for a few dollars a month. Compare options before your next move.

Compare Renters Insurance →

Find Your State’s Exact Rules

Notice periods, deposit caps, and the eviction timeline all change from state to state. Pick your state to see the exact days, dollar limits, and steps that apply where you live.

See Tenant Rights in All 50 States →

Sources & How to Verify

The rules on this page are drawn from official government and legal-aid sources. Tenant law changes, so always confirm the exact rule with your state’s statute or a local legal-aid office.

  • HUD: hud.gov — federal renter protections and fair housing
  • Legal Services Corporation: lsc.gov — find free legal aid in your state
  • Cornell Legal Information Institute: law.cornell.edu/wex — plain-English legal definitions
  • Your state statute & court self-help portal: search “[your state] landlord tenant act” and “[your state] court self-help eviction” for the exact law and forms

Content last reviewed September 2026. If you notice outdated information, please contact us.

New York Renter Guides

Related Guides

Renting? Protect your belongings — compare renters insurance at Home Insure Guide. Divorce involving a lease? See Divorce Help Guide. Unsafe housing / toxic mold injury? Some cases qualify — see Mass Tort Info.