NEW YORK (CBSNewYork) – In a setback for Mayor Bill de Blasio, an appeals court has ruled he will have to make public the secret emails he and his staff exchanged with a top political consultant.

As CBS2’s Political Reporter Marcia Kramer reported, de Blasio traveled across the Hudson on Tuesday to stand with Newark Mayor Ras Baraka at an event announcing free legal advice for low-income tenants fighting their landlords. But the change of scenery did nothing to change the mayor’s resolve not to take questions.

READ MORE: Driver Being Questioned After 15-Year-Old Girl Struck, Killed By School Bus In Brooklyn Hit-And-Run

“The mayor has to head on back to New York,” Baraka said.

Especially since he just received a slap in the face from an appeals court, which said under the Freedom of Information Law, he will have to make public email exchanges with political operative Jonathan Rosen, of public relations powerhouse BerlinRosen.

Team de Blasio argued that Rosen, who ran the scandal-scarred campaign for One New York, was exempt because he is an “agent of the city.” The court said, no way.

READ MORE: Experts Say 'Blue Monday' Is A Good Reminder To Reach Out To Those Who May Be In Need Of Emotional Support

“These documents include examples of the mayor and Mr. Rosen discussing issues important to BerlinRosen’s private clients. The documents are the types of communications that the FOIL  meant to make available to the public,” the court wrote. “Respondents’ attempts to withhold these communications run counter to the public’s interest in transparency.”

Susan Lerner of Common Cause hailed the decision.

“It’s an important reaffirmation that the public is entitled to know who is in contact with their elected officials, and it’s a strong statement in support of government transparency and, frankly, a bit of a rebuke to the mayor,” she said.

A spokesperson for de Blasio said the mayor is reviewing his options.

MORE NEWS: Yonkers Police Officer Injured After Altercation With Armed Suspect

Since the appellate division ruling was unanimous, he would have to get special permission to go to the state court of appeals to get it overturned.