The API meanwhile does not provide any "only" potion related identifers anymore :-(
In the past one could use the abilityId (buffId) of the potion which you were able to see at your character buffs.
I had worked on LibPotionBuff in the past but meanwhile the buffs that you will get via a potion share the same IDs with other skill's buffs. You are not able to detect if you currently have used a potion via their buff anymore.
But as you are searching for something "BEFORE" the potion is used and the buffId is transfered to your character buffs:
One could track the quickslots and maybe save when a potion was used from the quickslot, and maybe even get the cooldown left on that.
One also is able to read the active quickslot upon "selection" (not before using it though as the functions are private, or only via hacky inperformant ways of a stack trace, making the gamecode "wait" for the stack trace each time you try to use ANY skill or ACTIONBAR entry (including quickslots and utimates)!
) and try to do some checks with the quickslot item then, like check if it is a potion.
But that's all as there are not API functions to detect the "potion data"! You can only get the flavortext of the potion and then parse that text for info. It does not provide you a simple way to e.g. detect the potion type (stamina, magicka,health, ...), the potion's buff that it will apply (and the buff also does not tell you it will be a magicka + -> this could only have been mapped via LibPotionBuff then so it would need lookup tables), etc.
So there is no easy way to detect the potion in your slot is a stamina potion! Except for hardcoding a lookup table for ALL potions
LibPotionBuff does not provide them as it only stored the "buffIds" (abilityIds) and not the itemIds of the items. Maybe one could collect them and enhance it. But it would need updates each time they change or get new potion itemIds... and I dislike that. One maybe could scan all items ingame each API update once to check and dynamically collect them, but this takes time (~20-60 seconds) and lags your client then (once after an APIversion change) + will create SavedVariable files with the content that was dynamically selected which will make loading the game slower again as eah SV file increases loading time.
This all said: In keyboard mode. I do not knwo if gamepad mode provides the same but I guess somehow it will.
I'd say your request would be maybe somehow possible but there is a lot of manual effort to invest for updating it and keep it working.
I'd not count on someone trying or doing this.
My addon FCOStarveStop (keyboard mode I guess, never tested with gamepad as I do not own a controller) will provide a potion reminer based on LibPotionBuff. But soemhow it got instable as the potion buffs were changed by ZOs