There is info in the docs, its directly above the detach.interrupt() so you need to scroll down a bit from the attach interrupt() section (its still in the attach.interrupt section, just a long way down because of the amount of info).
Have a look at my thread here, i have set up a water usage monitor, it uses interrupts to count pulses from my water meter and publishes them to the cloud. The sleep part doesnt work well with the current firmware, hope they squash the wake up bug soon. but otherwise it works really well. i set the current meter value using a function and it keeps it up to date. next step will be creating a webhook to do something with the data