API Hit when App is uninstalled

Hello Everyone,
Is there any way to interact with the server when the app is uninstalled?

I want to set some status of the user in my database if he uninstalls the application.

How to achieve this?