The National Fire Protection Association (NFPA) is a nonprofit organization that works to reduce fire-related hazards and afflictions by providing codes and standards, research, training, and education.
The NFPA does not directly approve or endorse smoke or fire alarms. The codes exist only for those who choose to install the alarms.
NFPA 72 is a specific code written by the NFPA that covers the application, installation, location, performance, inspection, testing, and maintenance of fire alarm systems, fire warning equipment, and all of their components. While the code is not a mandatory compliance, it exists for those who choose to install fire or smoke alarms, and to minimize the possibility and effects of fire and related risks.