Elon Musk's X has challenged a New York state law that requires social media companies to disclose how they monitor hate speech, extremism, and other contentious content.

In a lawsuit filed on Tuesday, the social media platform, formerly known as Twitter, argues that the law forces companies to disclose "highly sensitive and controversial speech" that is protected under the constitution's First Amendment.

New York Attorney General Letitia James, who is in charge of enforcing this law, is the named defendant in X's lawsuit.

Social media sites have become the main source of news for Americans, with majority consuming it on networks like X, according to a new research from the Reuters Institute.

Deciding what content is acceptable on social media platforms "engenders considerable debate among reasonable people about where to draw the correct proverbial line," X said. "This is not a role that the government may play."