Window replacement is considered maintenance and does not generally require a permit. However, if you choose to install a different size, or potentially style of window, a permit is required. Habitable rooms in dwellings require a certain amount of natural light and natural ventilation, and there are requirements for egress through a window of certain rooms in an emergency. Reducing the size of a window could affect those requirements. Increasing the size of a window typically will involve structural modifications to the wall to create a larger header over the window, and framing modifications.