You ward an area and choose a password. Whenever a Small or larger corporeal creature enters the area without speaking the password, alarm sends either a mental alert (the spell gains the mental trait) or an audible alarm with the sound and volume of a hand bell (the spell gains the auditory trait). Either option automatically awakens you, and the bell lets each creature in the area attempt a DC 15 Perception check to wake up. A creature aware of the alarm must succeed at a Stealth check against the spell's DC or trigger it when moving into the area.
Heightened
3rd
You can specify a trigger for which types of creatures sound the alarm spell.
Source: Pathfinder Player Core, p. 314
Bring Alarm into a Pathfinder 2e game with The DM Screen.