Hi Sarah,
One idea would be to use the setTimeout() JavaScript method so that if there is, say 5 minutes of inactivity on the current page, that a pixel call go out to AudienceStream to inform our service of the inactivity at which point the visitor can be assigned a Badge, and Audience can be joined, and the API could be triggered.
We'd have to add logic to remove the Badge from the user on each page view so that visitors can re-enter the Audience if they show 5 minutes of inactivity on another page, but then you'd risk the chance of triggering multiple emails. We can get around that by using a Metric to count the number of times a visitor had 5 minutes of inactivity and ensure they can't join the Audience more than the number of times desirable.
This isn't exactly an elegant solution, but technically from the client side the browser can't call out to AS upon end of session (hence the need for the setTimeout), and AS mimics the analytics vendors as Jim stated to determine when the end of session occurs.
Thoughts?