# Webhooks

You can configure webhooks to be sent to an external URL for any Event recorded in your tenant using a Webhook Reactions with a Reactor. See the link below for more information on how to configure this:

{% embed url="<https://kbase.whitelabel-loyalty.com/product/loyalty-engine/reactors/reactions#custom-webhook>" %}

The general structure of each webhook body is as follows:

```json
{
  "type": "$EVENT_NAME",
  "reportedAt": "$timestamp",
  "subject": "$user.authIdentifier​",
  "payload": {
     ...
  }
}
```

This mirrors the structure used when [reporting an Event via the API](https://docs.whitelabel-loyalty.com/rewards#events-events-collection-post).

The exact `type` and `payload` will depend on which type of Event you have configured to be reported via webhook. Some common event type examples are listed in the tabs below.

{% tabs %}
{% tab title="REGISTERED\_ACCOUNT" %}

```json
{
  "type": "REGISTERED_ACCOUNT",
  "reportedAt": "2025-02-10T19:21:57.423Z",
  "subject": "3bfb2ee2-8217-4a1b-3228-08de2df0855c",
  "payload": {}
}
```

&#x20;&#x20;
{% endtab %}

{% tab title="CASHBACK\_REGISTERED" %}

```json
{
  "type": "CASHBACK_REGISTERED",
  "reportedAt": "2025-02-10T19:21:57.423Z",
  "subject": "3bfb2ee2-8217-4a1b-3228-08de2df0855c",
  "payload": {
    "amount": 1.15,
    "cardId": "ae4949b1-5bfe-423a-46fc-08ddb9a6e1f6",
    "status": "earned_pending_settlement",
    "offerId": "8d14a9ff-df95-4da6-c2c3-08db608182cd",
    "memberId": "b787875a-a9ed-415a-7ed1-08ddb9a4c720",
    "brandName": "Example Brand",
    "storeName": "Specific Store",
    "transactionId": "1df8c688-e26c-46a4-6681-08de1ae5d34e",
    "previousStatus": "trigger_accumulating",
    "webhookEventType": "reward_status_changed",
    "distributedToMemberAmount": 0
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kbase.whitelabel-loyalty.com/developer/resources/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
