If your notify URL supports authentication methods, define them when creating the webhook instance.
This is the most basic way to ensure your resource is only accessible from our IP ranges. Add the range to your API configuration. CIDR ranges are listed here.
The username and password are appended to the url parameter on the endpoint. The format is https://username:password@example.com/. A sample cURL request:
The API key is required by default to authenticate the API endpoint request. The cURL request above creates a webhook for transactional emails using the sent event, authenticated by adding the username and password to the URL.
If your notify URL uses token-based header authentication, define it as follows when creating the webhook object.
Cloudflare authorization is handled by adding headers in the Create/Update a Webhook endpoint. You can add any values as request headers. An example cURL request:
Send a request to the endpoint with any values as headers; multiple headers are supported. These headers are used for authentication when a webhook event is triggered to the URL.