New York City Mayor Bill de Blasio. NYLJ Photo/Rick Kopstein. New York City Mayor Bill de Blasio. NYLJ Photo/Rick Kopstein.

Emails between Mayor Bill de Blasio's office and an outside consultant not employed by the city are not exempt from New York's open records law, a state appeals court ruled on Tuesday, affirming a ruling last year by a lower court and granting attorneys fees to the plaintiffs.

In fighting requests brought under the state Freedom of Information Law by NY1 and the New York Post for emails between the mayor's office and Jonathan Rosen and members of BerlinRosen, Rosen's public relations firm, the mayor's office employed the novel argument that the consultants were “agents of the city.”

But a panel of the Appellate Division, First Department said that Manhattan Supreme Court Justice Joan Lobis correctly found in her ruling last year that de Blasio “lacked a rational basis” for withholding communications between his office and BerlinRosen.

BerlinRosen had been retained by the Campaign for One New York (CONY), a 501(c)(4) established after de Blasio was elected to his first term in 2013 to help further his administration's policy goals. CONY accepted donations from entities with business before City Hall, according to reporting in Politico.

Writing for a unanimous First Department panel, Justice Anil Singh said that, for communications between a government agency and an outside consultant to be considered exempt from FOIL, the consultant must be employed by the agency.

“This attempt expands the agency exemption and closes the door on government transparency,” Singh said.

Singh also noted that, in November 2016, more than 18 months after a NY1 reporter filed a FOIL request, the de Blasio administration released 1,500 pages of emails between the office and BerlinRosen.

Singh was joined on the decision by Justices David Friedman, John Sweeny, Ellen Gesmer and Cynthia Kern.

NY1 was represented by Akin Gump Strauss Hauer & Feld attorneys Douglass Maynard, Estela Diaz and Jessica Oliff Daly; the Post was represented by Davis Wright Tremaine attorneys Elizabeth McNamara and Jeremy Chase.

A spokesperson for Charter Communications, which owns NY1, said the company was pleased with the appellate court's ruling and that it “look[s] forward to receiving the requested documents.”

Assistant Corporation Counsels Richard Dearing, Devin Slack and John Moore appeared for the city. A Law Department spokesman said it is reviewing the decision.

The U.S. Attorney's Office for the Southern District of New York and the Manhattan District Attorney's Office both launched investigations into the nonprofit, but ultimately declined to bring any charges.

De Blasio shut down CONY in 2016, saying that it had accomplished its goals, namely promoting the implementation of universal prekindergarten and affordable housing legislation.

But CONY's dealings are still under scrutiny by state watch dogs, according to a release by the state's Joint Commission on Public Ethics (JCOPE).

Last month, the JCOPE reached a $40,000 settlement with James Capalino, a lobbyist who was solicited for donations by CONY's chief fundraiser.

Capalino donated a combined $100,000 on behalf of himself and lobbying clients, and he and the clients were subsequently able to have a breakfast meeting with the mayor.

Additionally, a group promoting legislation to ban horse-drawn carriages in the city agreed to pay a $10,000 to the JCOPE, also for making donations to CONY at the request of the organization's fundraiser, and for lobbying without filing required reports.