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.”