# Webhooks

{% hint style="info" %}
This step is optional and can be done at any point. Active webhook subscription is not a pre-requisite for using OffBlocks API and is engineered for convenient asynchronous processing of events
{% endhint %}

If you want a simple test for webhook notifications, you can set up a catch-all webhook endpoint via <https://webhook.site/>. You will have a unique generated URL you can use to receive notifications from OffBlocks API.

Please, follow the steps from [Webhooks](/developer-guides/api-integration/api-reference/webhooks.md) to set up and manage webhook notifications. For example, to set up a webhook notification for all entities' updates as a `POST` request to <https://webhook.site/81f3f721-303e-4b3c-899f-57db55aa5262>, make a `PUT` request to `/webhooks` with the following payload:

```json
{
    "callbackUrl": "https://webhook.site/81f3f721-303e-4b3c-899f-57db55aa5262",
    "types": [
        "customer.updated",
        "account.updated",
        "card.updated",
        "authorisation.updated",
        "transaction.updated"
    ]
}
```

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/webhooks" method="put" expanded="true" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

Once you create a new customer entity in step [Customer Creation](/developer-guides/step-by-step-guide/customer-creation.md), you will receive a notification similar to the following:

```json
{
  "chainId": "eip155:300:0x43158f45b5EbD7b1179130130DF00393928C2691",
  "createdAt": "2024-01-24T14:18:37.749861007Z",
  "eventId": "fb2ed25e-11b1-49ce-a703-75f0c2d58c09",
  "externalId": "5fb1479a-0ef4-418e-82b5-0eb76f8a3df9",
  "id": "29ca152b-a06a-5f6d-8f34-06a8f1250141",
  "status": "initiating",
  "updatedAt": "2024-01-24T14:18:37.749861007Z",
  "webhookType": "customer.updated"
}
```


---

# 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://docs.offblocks.xyz/developer-guides/step-by-step-guide/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.
