Airbnb says a bill that would outlaw advertising short-term rentals on its platform in New York is unconstitutional and is threatening to sue the state if Governor Andrew Cuomo signs it into law.

Airbnb has been fighting an uphill battle for legal status in New York, which prohibits landlords and homeowners from renting out apartments for less than 30 days at a time. The bill to prevent advertising these rentals would essentially cripple the company’s operations in New York, which is among its most lucrative markets.

In a letter to Cuomo and other state leaders, Airbnb outlines the legal action it says it would be forced take should the governor sign the bill, AB 8704-C, into law. “As this unlawful bill would impose real harm on our community, out of respect for the process and to inform your considerations, we want to formally notify the State that if it is signed into law by Governor Cuomo, Airbnb would have no choice but to immediately file suit against the State of New York and ask a court to declare the statute invalid and unenforceable as well as to award any damages and fees as appropriate,” Rob Chesnut, general counsel of Airbnb, writes in the letter.

“Airbnb wants to be clear that it does so more in sadness than in anger”

Chesnut adds, “In making such a formal notification, Airbnb wants to be clear that it does so more in sadness than in anger, as the company believes that there are clearly available lawful alternative legislative options to meet legitimate policy objectives while still protecting the right of everyday New Yorkers to share the homes they live in order to help make ends meet.”

Airbnb has been accused of exacerbating New York’s housing crisis by housing advocates, the state’s powerful hotel union, and members of the state legislature and New York City Council. Some unscrupulous landlords have been known to push out their tenants, many of them low-income, so they can turn their apartments into illegal hotels, which they advertise on Airbnb.

Last year, the New York attorney general released a report that found that from 2010 through early June of 2014, $168.3 million, or 37 percent percent of revenue generated by Airbnb hosts, came from hosts with three or more listings.

Airbnb has scrubbed thousands of listings off its site

In response, Airbnb has scrubbed thousands of listings that are known to be illegal hotels off its site. Last July, it kicked 2,233 listings — 5 percent of the total — off its New York City platform. It also released a new dataset of its listings in each of New York City’s 195 Neighborhood Tabulation Areas, a geographic designation used by the city’s Department of Planning to describe the neighborhoods in a way that aligns with US Census tracts. This data proves that “96 percent of the hosts on the Airbnb platform in New York City have only one listing,” the company says.

The bill to restrict Airbnb’s advertising passed both the New York State Assembly and Senate earlier this summer, and is now headed to Cuomo’s desk for his consideration. A spokesperson for the governor says no decision on whether to sign the bill has yet been made. “This is one among more than 500 bills that was passed by the Legislature in the last weeks of the legislative session,” the spokesperson said. “It remains under review by Counsel’s Office.”