In most cases, it is considered illegal to walk around in public in your underwear in New York City. However, there may be certain instances or designated areas where it could be acceptable. For example, on certain beaches or during specific events or parades, it may be permitted to wear minimal or revealing clothing without facing legal consequences.
To ensure compliance with the law and avoid potential penalties or misunderstandings, it is generally advisable to wear appropriate clothing that covers private areas when in public spaces in New York City.