# Webhooks

### Setup

Layerswap provides a webhook configuration functionality so that Partners can receive notifications on any swap status change. Webhooks can be set up per partner application. In order to configure a webhook the following steps must be performed:

* Login to <https://layerswap.io/dashboard>
* Select the organization/app
* From left pane select Webhooks, then provide the URL where the webhook should be received and click Create Webhook
* The newly created webhook should appear under the app
* Copy the webhook secret for future verification

<figure><img src="/files/FIBEQ4KzknZEa0pDcE9c" alt=""><figcaption><p>Webhook configuraiton</p></figcaption></figure>

### Verification

Layerswaps uses Svix for Webhook Management. In order to verify an incoming webhook from Svix please refer to <https://docs.svix.com/receiving/verifying-payloads/how>. Use the webhook secret from the dashboard as a Svix secret.

For the structure of the swap notification, please refer to the [Swap Data object](/api/data/object-types.md). Please note that the complete information webhook will be sent only when the swap status is completed. For other statuses, notification will include a subset of this information (whatever is available at that time).


---

# 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://learn.layerswap.io/api/api-integration/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.
