The District of Columbia Code Title 42 Chapter 35 Section 05.51 authorizes a landlord to enter a residential rental property under the following circumstances:
Access by Housing Provider to Dwelling Unit
(a) For the purposes of this section, the term:
(1) “Reasonable notice” means written notice provided to the tenant at least 48 hours before the time the housing provider wishes to enter the unit or a shorter period of time as agreed to by the tenant in writing. Written notice may include electronic communication, including email and mobile text messaging; provided, that if the tenant fails to furnish a written acknowledgement, the housing provider will provide a paper notice.
(2) “Reasonable purpose” means a purpose that is directly related to the housing provider’s:
(A) Duty to keep the entire property safe from damage;
(B) Duty to inspect the premises;
(C) Duty to make necessary or agreed repairs, decorations, alterations, renovations, or improvements;
(D) Duty to supply necessary or agreed services and maintenance;
(E) Need to exhibit the dwelling unit to prospective or actual purchasers, mortgagees, tenants, workmen, or contractors; or
(F) Need to gain entry for work ordered by a governmental entity.
(3) “Reasonable time” means a time between the hours of 9 a.m. and 5 p.m., and not on a Sunday or federal holiday, or at another time agreed upon by the tenant.
(b)(1) Except in the event of an emergency for the protection or preservation of the premises, or for the protection and safety of the tenants or other persons, a housing provider may enter a rental unit during a tenancy only for a reasonable purpose, at a reasonable time, and after having provided the tenant with reasonable notice.
(2) Upon a showing by the tenant that the housing provider has entered a unit in violation of this section, or has repeatedly made unreasonable demands for entry, any court of competent jurisdiction may enjoin the housing provider from that behavior and may assess appropriate damages against the housing provider for breach of the tenant’s right to quiet enjoyment of the premises.
(3) Upon the allegation of a housing code violation by a tenant, a tenant may not unreasonably prevent the housing provider from accessing the unit for assessment and abatement of the alleged violation and must provide access to the unit within 48 hours of the written request by the housing provider for access.
DC Code § 42–3505.51.