It was part of an agreement in which the office of Eric Schneiderman, New York Attorney General, finally got Airbnb to hand over user data — but in a redacted form. The state will be able to make a second request for unredacted information for any listing that appears to be illegal. Airbnb had earlier gotten a judge to agree that the AG’s initial request was too broad.

This agreement is far from Airbnb being made legit in one of its largest markets. The company says it would give New York City and state some $21 million in annual taxes if it were permitted to collect them from its guests and hosts.

For the next year, new New York hosts will now have to click through a screen informing them of New York short-term rental restrictions, and messages will be emailed to old hosts as well.

It says that apartments in buildings that have multiple dwellings can’t be rented unless a permanent occupant is present, no money is exchanged, or the stay is longer than 30 consecutive days. It lays out tax information, rent-control regulations, zoning codes and business-licensing rules.

Airbnb and the AG’s office put out a joint statement on the matter: “Airbnb and the Office of the Attorney General have worked tirelessly over the past six months to come to an agreement that appropriately balances Attorney General Schneiderman’s commitment to protecting New York’s residents and tourists from illegal hotels with Airbnb’s concerns about the privacy of thousands of other hosts. The arrangement we have reached today for compliance with the OAG subpoena strikes this balance.”