How to delete specific notifications from schedulednotification?

Hi,

I’m trying to figure out how to delete specific notifications from schedulednotification.
I’ve seen in the doc that we can cancel a single scheduled notification thank to its ID, but it shows an example in which the notification is scheduled and automatically deleted (which isn’t a right behaviour in my case).

I want the user to be able to cancel the notification later.

My question: How can I get the ID so I can cancel one of the scheduled notifications later?