The brief filed in New York State Supreme Court's appellate division said the lower court failed to protect the constitutional rights of the defendant and improperly ruled that Twitter has no legal standing in the case.
Twitter's argument said it filed the case to protect its terms of service which "have long established that users have a proprietary interest in their records. Twitter users own their Tweets and should have the right to fight invalid government requests."
The brief said the company was acting on behalf of its users who "have standing based on a long line of precedent establishing that individuals whose constitutional rights are implicated by a government subpoena."
Earlier this year Manhattan criminal court Judge Matthew Sciarrino ruled that law enforcement had the right to see tweets and other user data from Malcolm Harris, who is being prosecuted for disorderly conduct in connection with an Occupy protest on the Brooklyn Bridge last year.
The judge said that the tweets are not private information and thus not subject to the constitutional guarantee of privacy.
"If you post a tweet, just like if you scream it out the window, there is no reasonable expectation of privacy," he said in an 11-page ruling.
The American Civil Liberties Union said it would file a brief in support of Twitter's appeal.
"Under the (constitution's) First and Fourth Amendments, we have the right to speak freely on the Internet, safe in the knowledge that the government cannot obtain information about our communications or our private information unless law enforcement obtains a warrant showing probable cause," said ACLU lawyer Aden Fine.
"The (prosecutor) didn't do that here. Instead, it has tried to avoid these constitutional hurdles by issuing a mere subpoena for Harris's Twitter information."
For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.