Manage hooks via webtask API

In this post (Managing hooks and rules) it is mentioned that hooks can be managed using the Webtask API. How would that work specifically? Unfortunately, I am not sure where I should get the Webtask API token from. I found samples in the Auth0 Extend documentation, but I do not know how to apply the samples to the Webtasks in my Auth0 account.

If you follow the instructions on how to setup the Auth0 Command Line Interface (CLI) to manage hooks you’ll find how to obtain the token necessary to also perform the API calls. Having possession of the token you can see the Webtask API docs to get an overall idea of the API surface. Have in mind that hooks are a specialization of webtasks and as such the CLI has better handling for reflecting the necessary hooks configuration into a webtask API call so you may need to do some further analysis to reach to the point where you can manage hooks through the Webtask API.

A possible approach would be to inspect the underlying requests made by the CLI as a quick way to know how to perform them directly against the API.