Contact you local building department and code enforcement department, and ask them for the requirements for documenting a nonpermitted addition. They will most likely give you a packet of forms you must fill out. Follow the instructions on the forms to fill it out.
Contact a licensed architect or engineer to draw the plans of your current structure. Inform the architect or engineer which rooms make up the nonpermitted addition. The architect or engineer will draw the plans for the addition and will inform you of all the required fixes to bring it up to code. Do not try to draw the plans yourself; once you have an illegal addition, only a licensed architect or engineer can draw the plans.
Turn in the filled-out forms and the plans drawn by the architect to the building department. You will have to pay permit fees that varies by municipality and is determined by the square footage of the addition. The building department will review the plans and tell you all changes you must make to make the addition legal.
Make all the fixes and changes indicated by the architect or engineer and the building department. In some cases, you will need to demolish the addition. If this is the case, contact a demolition contractor. Contact the building department to inspect the addition after you have made all the required fixes. After the inspection by the building department, the addition will be legal and documented.