New York City is suing more than 20 online e-cigarette vendors, alleging they sold and aggressively marketed their products to minors in the Big Apple.

The suit filed by the de Blasio administration in Brooklyn federal court Wednesday alleges the 22 online retailers failed to use age verification systems on their websites and targeted minors with vape flavors mimicking desserts and cereals — violating city law and creating a public nuisance.

“Preying on minors and hooking them on a potentially lethal, lifelong nicotine addiction is unconscionable,” Mayor Bill de Blasio said in a statement. “This lawsuit sends a message: we will do whatever it takes to protect our kids and the health of our city.”

The New York City Sheriff’s Office recruited two people under the age of 21 to purchase e-cigs from each of the defendants in a sting in July and August this year.

The pair created an email account to purchase the products, which were then shipped to an address controlled by the sheriff’s office. The products arrived addressed to the girls without any requirement to show identification, the suit says.

“Given the ease with which these purchases were made, it is clear that individuals under the age 21 throughout New York City can easily purchase e-cigarettes from Defendant’s internet sites,” the suit reads.

The suit also alleges the defendants specifically targeted teens — selling vaping liquids with flavors including “whipped salted caramel,” “berry slush” and “cinnamon toast cereal.”

The defendants also shared videos of vaping tricks and images of young people who appeared to be high school age vaping on their Facebook and Instagram accounts, the suit charges.

The 22 retailers — with names including Artisan Vapor Company, CravinVapes and Eliquidstop — are headquartered in California, Kentucky, Nevada, Florida and Texas. They did not immediately respond to requests for comment.

The suit comes one day after city officials confirmed a Bronx teenager was the first person to die of a vaping-related illness in New York.

Two dozen people have died from vaping-related illnesses nationally, according to the US Centers for Disease Control and Prevention, while more than 1,000 illnesses have been confirmed.