> For the complete documentation index, see [llms.txt](https://help.enterprise.ledger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.enterprise.ledger.com/api-documentation/tutorials/api-functionalities/events-via-web-hooks.md).

# Events via web-hooks

Stay informed about events related to accounts, groups, requests, transactions, users, or whitelists by subscribing to web-hooks. Configure notifications using the following example:

{% tabs %}
{% tab title="Bash" %}

```bash
curl --request PUT \
  --url https://api.vault.ledger.com/notifications/configuration \
  --header 'authorization: Bearer {{access_token}}' \
  --header 'content-type: application/json' \
  --header 'x-ledger-workspace: minivault' \
  --data '{
    "all": {
      "webhook": {
        "secret": "secret", 
        "url": "{{notification_endpoint}}"
      }
    }
  }
```

{% endtab %}

{% tab title="JSON" %}

```json
{
  "all": {
    "webhook": {
      "secret": "secret",
      "url": "https://webhook.site/9773a594-4764-4807-8921-100133557f82"
    }
  }
}
```

{% endtab %}
{% endtabs %}

With notification\_endpoint a valid HTTPS endpoint that accepts POST queries with the payload similar too:

```json
{
  "payload_type": "TRANSACTION",
  "event_type": "NEW_TRANSACTION_HAS_BEEN_RECEIVED",
  "id": 260
}
```

For more details on how to use this endpoint please refer to the [API documentation](/api-documentation/reference/api-reference/notifications.md).

Replace `{{notification_endpoint}}` with a valid HTTPS endpoint that accepts POST queries. You'll receive notifications similar to the following payload:

```json
{
  "payload_type": "TRANSACTION",
  "event_type": "NEW_TRANSACTION_HAS_BEEN_RECEIVED",
  "id": 260
}
```


---

# 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://help.enterprise.ledger.com/api-documentation/tutorials/api-functionalities/events-via-web-hooks.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.
