Allow Webhooks to be added/removed via CircleCI API
Currently (Jan 2022), the only way to add/remove a webhook to a project is to do it manually via the project settings page.
What would be very useful is the possibility of using the CircleCI API for this task.
The API would be rather simple, because essentially we are adding or removing items from a dictionary.
This would benefit both users and CircleCI - because the current situation discourages users to use webhooks in favor of polling, which is inconvenient for everybody.
Some details of my use case follow.
In my case, I work in an organization with ~50 repositories. We have several "dashboards" that we built on top of the CircleCI API. These dashboards poll regularly the projects to get the latest news.
The reason we don't use webhooks is not just the fact that it is a hassle to set them up manually, but also the (more important) reason that we do not have a way to verify that the webhooks are deployed, because not even this fact is exposed by the API.
When we create a new repository, at least we can check via the API if the project is set up. (if not, the user is directed to set it up.)
But we are not be able to check whether a webhook is installed (without hacking a scenario which involves generating jobs and polling).