# Webhooks

With Webhooks, your app can know when something happens in Underdog, such as creating a Project or minting an NFT.

## Registering Webhooks

To register a new Webhook, you need to have a URL in your app that Underdog can call. You can configure a new Webhook from the Underdog dashboard. Add your URL and pick the events you want to listen for.&#x20;

Now, whenever something of interest happens in Underdog, a Webhook is fired off by Underdog. In the next section, we'll look at how to consume Webhooks.

## Consuming Webhooks <a href="#consuming-webhooks" id="consuming-webhooks"></a>

When your app receives a webhook request from Underdog, check the `type` attribute to see what event caused it. The first part of the event type will tell you the payload type, e.g., an NFT, Project, etc.

{% code title="Example Webhook payload" %}

```json
{
  "id": "66396cba-f6f7-488e-8431-665598548661",
  "type": "collection.create",
  "data": {
    "mintAddress": "GQw5KBtUo1tUa29BsFEJ4F9mdFsXALoHRTRaBfAvFsbU"
    // ...
  }
}
```

{% endcode %}

In the example above, there was a `project.create`.

## Transaction Types

<table><thead><tr><th width="245.66666666666666">Transaction Type</th><th>Details</th></tr></thead><tbody><tr><td><code>project.create</code></td><td>Project was successfully created</td></tr><tr><td><code>project.nft.create</code></td><td>NFT in a Project was successfully created</td></tr><tr><td><code>project.nft.update</code></td><td>NFT in a Project was successfully updated</td></tr><tr><td><code>project.nft.revoke</code></td><td>NFT in a Project was successfully revoked</td></tr><tr><td><code>project.nft.burn</code></td><td>NFT in a Project was successfully burned</td></tr></tbody></table>

{% code title="Example payload" %}

```json
{
  "id": "12b9d241-bff6-4e64-91d7-3b19d27b42f6",
  "type": "project.create",
  "data": {
    "mintAddress":"DoBjCkCgwpqUQEKqEnjEsi8vStUch6xbHAoERSNK5WQM",
    "superAdminAddress":"Aht2mY2BKAkt7aJtTkeMEyrZH7rG2UNFt3sVaKTQtxmX",
    "orgId": 1,
    "projectId": 1,
    "transferable": true,
    "nftId": 1,
    "name":"Project #1",
    "description":"Description for Project #1",
    "image":"https://exmaple.com/project.png",
  }
}
```

{% endcode %}

## API Reference

{% content-ref url="/pages/vfKhyp7tVYfj7jrZnFjq" %}
[Webhooks](/resources/webhooks.md)
{% endcontent-ref %}


---

# 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.underdogprotocol.com/guides/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.
