app.post('/uninstalled', addon.authenticate(), (req, res) => {
.. do stuff to delete things here ...
res.send(204)
})
Now that said - you probably don’t want to do anything seriously deletion in the /uninstalled hook. The best way to detect if an app has been removed from an instance is to poll the instances everyday and after X days of continuous lack of access (check for the license end point) - then declare that things has been removed and you can delete. (Or at least that’s what I’ve been told and haven’t heard anything to the contrary - @nmansilla@rwhitbeck@mpaisley - please correct me).
Now you can use the /uninstalled hook as an indicator that something should be removed - but it is still http so not guaranteed (there are a lot of devices between your service and Atlassian)…