# Webhook Events

You can receive webhook events when [NFT transfers](/apis/transfers.md) and new [NFT Tokens or Collections](/apis/mint-nfts.md#create-an-nft-collection-contract) are completed on the blockchain. This is a great way to keep your UI responsive and up to date, though it is optional. Alternatively, you can also poll using the Requests API.

To enable webhook events, you need to create a URL endpoint on your app that can read and respond to these events. Then, just let us know your URL and we can help set it up for you. You will start receiving webhooks with the following data:

## Event Types

#### `sent` - a blockchain transaction has been sent successfully

The `request_id` will match the one returned by the [API](/apis.md) call.

```
{
"type" : "sent",
"request_id" : "d27c2d343731f3b6894b1afa2d44c9f203d624cb0c99de1f3e00eb0a0ebe73bb",
"transaction_hash" : "0x5e14fa2b23dd36f28549d11d15589ba3a03b9b7773de234c4c5f19f1a2954327"
}
```

#### `completed` - a blockchain transaction completed successfully

The `request_id` will match the one returned by the [API](/apis.md) call. If this event is related to creating a new NFT token, then the `nft_collection` and `nft_token_id` are also returned

```
{
"type" : "completed",
"request_id" : "d27c2d343731f3b6894b1afa2d44c9f203d624cb0c99de1f3e00eb0a0ebe73bb",
"transaction_hash" : "0x5e14fa2b23dd36f28549d11d15589ba3a03b9b7773de234c4c5f19f1a2954327",
"nft_collection":"0x90de09166cd8ae30dc2bfe25be0f5bd486851cd7",
"nft_token_id":1
}
```

#### `error` - a blockchain transaction error occurred

The `request_id` will match the one returned by the [API](/apis.md) call.

```
{
"type" : "error",
"request_id" : "d27c2d343731f3b6894b1afa2d44c9f203d624cb0c99de1f3e00eb0a0ebe73bb",
"transaction_hash" : "0x5e14fa2b23dd36f28549d11d15589ba3a03b9b7773de234c4c5f19f1a2954327"
}
```


---

# 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.nftyverse.com/webhook-events.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.
