> For the complete documentation index, see [llms.txt](https://docs.nalpeiron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nalpeiron.com/zentitle2-docs/ui-administration/webhooks.md).

# Webhooks

Set up webhooks to receive real-time notifications from Zentitle2 instead of polling the API, and learn how to verify each call's signature for security.

### About Webhooks

Our webhooks are a more efficient way of managing events than using the management API to query information that changes over time. Instead of constantly polling for updates, a webhook is set up once and is only triggered when a specific event occurs. The main advantage of webhooks is that they provide real-time data updates on the various parameters used in license management.

Webhooks are callback mechanisms that web applications use to provide real-time notifications to other systems. Essentially, a webhook is a way for an application to send data to another application automatically when certain events occur.

The basic idea behind webhooks is that one application sends an HTTP POST request to a URL specified by another application, indicating that a certain event has occurred. The receiving application then processes the data in the request and takes appropriate action based on the content.

Webhooks are commonly used in a wide variety of applications, such as:

* Integrating with third-party services to receive notifications when specific events occur
* Triggering custom workflows or automation tasks in response to user actions
* Updating data in real-time across multiple systems and applications
* Automating data synchronization between different systems

In essence, webhooks operate in contrast to APIs, which require the client application to continuously request updates from the server. With webhooks, the server proactively pushes data to the client, eliminating the need for the client to check for updates and reducing the server's workload constantly.

### Security

Each webhook call is sent with the `N-Signature` header in the HTTP Post request. This header contains a signature of the webhooks payload message created with your account's RSA key. It's a good practice to create a signature from the payload received and compare it with the header value. If it matches, it means the webhook was sent by the Zentitle2 service and not by a malicious actor.

The RSA key can be obtained from the "Administration > API Credentials > Licensing API" page. An example of the signature verification is implemented in our example code: <https://github.com/Nalpeiron/samples-dotnet/tree/master/Webhooks.Console>

### Managing webhooks

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FbrFnCJsv5G61jNsjVmof%2Fwebh.png?alt=media&amp;token=f6d823bb-bf92-40e3-a848-5c85e5b82c12" alt=""><figcaption></figcaption></figure>

#### Adding a webhook

Webhooks are located under the "**Administration**" > "**Webhooks**" on the top menu.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FZ6RIIIX7FinX91BAg8Rr%2Fwebhooks%20add.png?alt=media&amp;token=ee53f5ba-c308-4f4f-ae37-ad8bd06ae445" alt=""><figcaption></figcaption></figure>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FIvC85MvJkVs2NsLCzG2A%2Fcounter_1_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=e9e24ee0-b25b-4028-a774-f5b21e399e85) To add a new webhook handler, click on 'Add Webhook'.

<div align="left"><figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FRTTBFui0mw4spfdDT0Cj%2Fimage.png?alt=media&amp;token=6d5b63df-cfa5-45f8-b8d4-df39e53ca2b6" alt="" width="375"><figcaption></figcaption></figure></div>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FBggKfcwtHYyokAoW6CA4%2Fcounter_2_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=b4a1c291-524f-4064-838e-5dfaac404fea) Enter the URI of the webhook handler.

<div align="left"><figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2F0PJOVBXYIkmsfqn4oREz%2Fimage.png?alt=media&amp;token=8c847fbf-656c-4ee3-8735-6659ed59c21b" alt="" width="563"><figcaption></figcaption></figure></div>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FgP2ydddGH7JrOOoUkK6o%2Fcounter_3_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=25e6aed0-9d7d-4425-b8d7-82ae916130d2) Select the events that you wish the handler to manage.

<div align="left"><figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FZQdzeBxTWLxDyx1Liu3b%2Fwebhook%20add%20save1.png?alt=media&amp;token=fe0ef8ad-aa8c-4785-83e8-85e43bde8e95" alt=""><figcaption></figcaption></figure></div>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FPDkUUXICZp0VjoNW7xDd%2Fcounter_4_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=76f36e3b-7c9c-4fcf-b9bc-fe96049d5b4d) Click on 'Save Events'.

<div align="left"><figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FzLhyVK2Gd5rPfRHCDknQ%2Fwebhook%20save.png?alt=media&amp;token=11ceaf0d-b302-4d47-aec3-0436e3b5d9d0" alt=""><figcaption></figcaption></figure></div>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FeDNjcr6hYAUKl9tnMeXo%2Fcounter_5_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=c1110a9d-a776-4560-a37a-e9cf95e523cd) Then click on 'Save' to add the webhook:

***

#### Editing a webhook

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2Fgn0XErM8fdRy9rZoSp3c%2Fwebhook.png?alt=media&amp;token=08207777-5d5f-4c98-9a6f-e3ed7ce9d502" alt=""><figcaption></figcaption></figure>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FIvC85MvJkVs2NsLCzG2A%2Fcounter_1_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=e9e24ee0-b25b-4028-a774-f5b21e399e85) To edit an existing webhook handler, click on that entry.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2Fl5riis64qNdDqlotHr8C%2Fwebhook%20edit.png?alt=media&amp;token=e6878989-453b-4551-be74-d43648ab8a1e" alt=""><figcaption></figcaption></figure>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FBggKfcwtHYyokAoW6CA4%2Fcounter_2_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=b4a1c291-524f-4064-838e-5dfaac404fea) Update the appropriate details.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FCZIYjdwGLxM2u4nWAJiS%2Fwebhook%20edit2.png?alt=media&amp;token=d6f449ba-4d7a-4264-a5c0-90f4dfad510c" alt=""><figcaption></figcaption></figure>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FgP2ydddGH7JrOOoUkK6o%2Fcounter_3_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=25e6aed0-9d7d-4425-b8d7-82ae916130d2) Click 'Save Events.'

<div align="left"><figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FzLhyVK2Gd5rPfRHCDknQ%2Fwebhook%20save.png?alt=media&amp;token=11ceaf0d-b302-4d47-aec3-0436e3b5d9d0" alt=""><figcaption></figcaption></figure></div>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FPDkUUXICZp0VjoNW7xDd%2Fcounter_4_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=76f36e3b-7c9c-4fcf-b9bc-fe96049d5b4d) Then, click "Save."

***

#### Deleting a webhook

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FxS4JHPhROAS7DLpeXONZ%2Fwebhook%20(1).png?alt=media&amp;token=e7d81207-0737-4f27-a89d-769fd00a12f5" alt=""><figcaption></figcaption></figure>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FIvC85MvJkVs2NsLCzG2A%2Fcounter_1_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=e9e24ee0-b25b-4028-a774-f5b21e399e85) To delete a webhook handler, click on it.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2Fl5riis64qNdDqlotHr8C%2Fwebhook%20edit.png?alt=media&amp;token=e6878989-453b-4551-be74-d43648ab8a1e" alt=""><figcaption></figcaption></figure>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FBggKfcwtHYyokAoW6CA4%2Fcounter_2_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=b4a1c291-524f-4064-838e-5dfaac404fea) Click "edit."

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2Fw3HOFQI7DrcpNUD09BNt%2Fwebhook%20delete.png?alt=media&amp;token=fc6accb9-4213-4651-b181-995e784c54ed" alt=""><figcaption></figcaption></figure>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FgP2ydddGH7JrOOoUkK6o%2Fcounter_3_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=25e6aed0-9d7d-4425-b8d7-82ae916130d2) Click the 'three dots' icon and "Delete webhook."

<div align="left"><figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FXQzacXdZS8glHCLKljwH%2Fwebhook%20del2.png?alt=media&amp;token=c3f193cd-d755-4db0-9e98-405948c93bf7" alt="" width="418"><figcaption></figcaption></figure></div>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FPDkUUXICZp0VjoNW7xDd%2Fcounter_4_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=76f36e3b-7c9c-4fcf-b9bc-fe96049d5b4d) Click "Delete".

### Testing

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FyEom5SESb542xIAeKtmQ%2Fwebhook%20test.png?alt=media&amp;token=ec654d1b-120d-4946-bb1a-cff8317ab2f4" alt=""><figcaption></figcaption></figure>

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FIvC85MvJkVs2NsLCzG2A%2Fcounter_1_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=e9e24ee0-b25b-4028-a774-f5b21e399e85) To test your webhook handler, click on the 'Test' button to the right of the listed events.

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FBggKfcwtHYyokAoW6CA4%2Fcounter_2_FILL0_wght400_GRAD0_opsz24.svg?alt=media\&token=b4a1c291-524f-4064-838e-5dfaac404fea) Confirm you wish to trigger a call to the specified webhook handler.

This action generates a new WebhookEvent and triggers a call to the listener URI. The payload of this call is empty; the resource id contains the ID of the listener:

![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FWFXvlttw9vdh2ZIVUj33%2Ftest%20webhook2.png?alt=media\&token=bc585b16-d948-40d8-bf71-18ec67929ad6)

{% hint style="warning" %}
This event is not retried if the request fails. Hit 'Test' again to generate another event.
{% endhint %}

### Using webhooks

Go to our API docs for more details on using the webhooks you have set up: <https://api.nalpeiron.io/docs/#tag/Webhooks>

### Examples and payloads

You can find examples as well as payloads on our API docs page in the "Webhook Events" section:\
<https://api.nalpeiron.io/docs/#tag/Webhook-Events>

***

Now [go to the SDK and API documentation](/zentitle2-docs/developers/licensing-and-management-apis.md) to learn about implementation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nalpeiron.com/zentitle2-docs/ui-administration/webhooks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
