While sending alerts and recovery messages (success states) via mail or to an API using curl, there is no assignment between alerts and recoveries.
A unique identifier within an alert message could do the trick. This alert message ID could be stored in an environment variable f.e. $MONIT_ALERT_ID. Based on this ID you could use this to get the assignment between the alert and the recovery.
Is it possible to create such a functionality?