API Reference

NFT Collection Activity Webhook

Get real-time updates when an NFT is transferred from the NFT collections that you track using the NFT Activity webhook.

ChainMainnet
Ethereum

Introduction

The NFT Collection Activity webhook allows you to track all the IDs in ERC721 and ERC1155 token contracts. This provides your app with real-time state changes when an NFT is transferred between addresses.

Example Response

When an ERC721 or ERC1155 from the NFT contracts that you are tracking gets transferred, you receive a response from the webhook that looks like this:

{
    "id": "1f73d51e371a40b18d16b6b75f96f2d1",
    "webhookId": "51a7ad1b-9ace-4da1-8f57-4e95dcb00046",
    "type": "NFT_COLLECTION",
    "createdAt": "2023-09-10T14:38:55Z",
    "event": {
        "network": "eth-mainnet",
        "activity": [
            {
                "category": "erc721",
                "fromAddress": "0x2a1c77a684426fe6ced7a3fca5878fed76fdd1a3",
                "toAddress": "0xe191c594f62d05da89768461ddeee5a03980d4a5",
                "tokenId": "5151",
                "amount": "1",
                "tokenAddress": "0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                "log": {
                    "blockNumber": 18106623,
                    "blockHash": "0x759d6b23505aa3091899990d45fb354ea451fd5af536169543c8cdd1bfe8b679",
                    "transactionHash": "0x08a5221256d8a2769edbb5eab2819f5c19723ccdf57d16b1c07bc6ada03a7f90",
                    "address": "0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                    "data": "0x",
                    "logIndex": "0xc5",
                    "remove": false,
                    "topics": [
                        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                        "0x0000000000000000000000002a1c77a684426fe6ced7a3fca5878fed76fdd1a3",
                        "0x000000000000000000000000e191c594f62d05da89768461ddeee5a03980d4a5",
                        "0x000000000000000000000000000000000000000000000000000000000000141f"
                    ],
                    "timestamp": 1694356727
                }
            }
        ]
    }
}

Field Definitions

Below you can find descriptions for each field of the response.

FieldDescriptionValue
idID of the event.1f73d51e371a40b18d16b6b75f96f2d1
webhookIdUnique ID of the webhook destination.51a7ad1b-9ace-4da1-8f57-4e95dcb00046
typeWebhook event type.NFT_COLLECTION
createdAtTimestamp when the event notification was created.2023-09-10T14:38:55Z
eventActivity object.N/A
networkThe default network for the webhook.eth-mainnet
activityList of transfer events whose from or to address matches the address configured in the NFT Collection Activity webhook.N/A
categoryThe erc-721orerc-1155data standard.erc721
fromAddressTransfer from address.0x2a1c77a684426fe6ced7a3fca5878fed76fdd1a3
toAddressTransfer to address.0xe191c594f62d05da89768461ddeee5a03980d4a5
tokenIdRaw erc721 or erc1155 token ID.5151
amountTransferred value amount.1
tokenAddressThe erc721 or erc1155 contract address.0x60e4d786628fea6478f785a6d7e704777c86a7c6
logReturned log of the NFT Activity event.N/A
blockNumberThe number of the block including this transaction.18106623
blockHashA hash of the block including this transaction.0x759d6b23505aa3091899990d45fb354ea451fd5af536169543c8cdd1bfe8b679
transactionHashTransaction hash.0x08a5221256d8a2769edbb5eab2819f5c19723ccdf57d16b1c07bc6ada03a7f90
addressOriginal address of the log.0x60e4d786628fea6478f785a6d7e704777c86a7c6
dataNon-indexed arguments of the log.0x
logIndexID of the event.0xc5
removedTransaction is in a chain re-org tag.false
topicsAn array of zero to four 32 bytes of indexed log arguments.["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000002a1c77a684426fe6ced7a3fca5878fed76fdd1a3", "0x000000000000000000000000e191c594f62d05da89768461ddeee5a03980d4a5", "0x000000000000000000000000000000000000000000000000000000000000141f"]
timestampBlock time.1694356727

How to Set Up NFT Collection Activity Webhooks

  1. Navigate to the Webhook tab in your ZAN Dashboard.
  2. Click the Create New button.
  3. Set a name of the webhook. Then NFT Collection template in the dropdown.
  4. Select your Chain in the dropdown. Then choose your Network.
  5. Paste your NFT contract address into the Contract Address field.
  6. Paste your unique webhook URL into the WEBHOOK URL field.
  7. Select all address events that you need to get notifications in Event dropdown.
  8. Test your webhook by clicking the TEST button.
  9. After the test is successful, click Confirm. Your webhook appears in the list.
  10. Check your endpoint to see the responses.

📘

Note:

For more detailed steps on how to set up NFT collection activity webhooks, please refer to Create a New Webhook.