Tweaked the API.  Now takes POST variables origin and intent, which suggest the appropriate action.
Monkeyed around with the interface a bit.