Electric bikes used by delivery workers are legal in other states like California and Illinois. New York City has allowed only pedal-assist bicycles, which require the rider to pedal. Citi Bike, the bike-share program, introduced electric bikes as part of its fleet, but had to remove them in April because of safety concerns about the brakes.

Electric scooters recently became legal in New Jersey and have hit the streets in Hoboken. Now scooter companies like Lime are considering pilot programs in upstate New York in cities like Ithaca and Rochester.

The New York City Council will most likely consider its own regulations for scooters, including whether to require helmets as Portland, Ore., did.

The state legislation has some broad rules: Scooter users must be at least 16 years old, and it bans electric scooters and bikes from the Hudson River Greenway, a popular path in Manhattan.

Corey Johnson, the City Council speaker, has expressed concern about allowing scooters in Manhattan and suggested a pilot program in the Rockaways in Queens. Mr. Johnson understands the hazards — he fell off a scooter in Mexico City earlier this year.

“I still have concerns about the public safety effects of scooters on our streets,” Mr. Johnson said in a statement on Tuesday. “But at least now we have the clarification from Albany we needed to take a real look and see if they can work safely here.”

Some New Yorkers have already bought private electric scooters and flout the rules, risking a $500 fine. A sleek scooter from Bird sells for $1,299. Under the legislation, private scooters would be allowed in Manhattan, though not through rental companies.