Checkout Overview of Share Point webhooks to learn more about webhooks.Also note that several webhook samples are available from the sp-dev-samples Git Hub repository.
This allows you to provide an event handler that performs a custom routine, such as canceling the update operation, whenever this event occurs.
The solution is a provider-hosted add-in (remote event receivers are not supported with Share Point-hosted apps).
This sample shows adding the remote event receiver to the host web by clicking button in the provider hosted add-in, but this could be done also automatically either when the site or site collection is provisioned; or when the add-in is installed by using add-in Installed and Handle add-in Uninstalling properties of the Visual Studio solution.
The sample code in this solution simply appends text to the Description field.
If you attempt to uninstall the add-in while debugging, you will notice that you receive a permission denied error.