Underdog Protocol
  • API Documentation
  • Quickstart
  • Guides
    • Postman
    • Endpoints
    • Authentication
    • Pagination
    • Errors
    • Webhooks
    • Architecture
  • Resources
    • Projects
      • Transferable Projects
      • Non-Transferable Projects
      • NFTs
        • List all NFTs
        • Search NFTs
        • Create an NFT
        • Retrieve an NFT
        • Update an NFT
        • Generate Claim Link
        • Revoke an NFT
        • Burn an NFT
      • Methods
        • List all Projects
        • Create a Project
        • Retrieve a Project
        • Update a Project
        • Retrieve Project Stats
    • NFTs
      • Retrieve an NFT
      • Generate Claim Transaction
    • Orgs
      • List all Orgs
    • Transactions
      • List all Transactions
      • Retrieve a Transaction
    • Webhooks
      • List all Webhooks
      • Create a Webhook
      • Delete a Webhook
    • V1
      • Collections
        • List all Collections
        • Create a Collection
        • Retrieve a Collection
      • NFTs
        • List all NFTs
        • Create an NFT
        • Retrieve an NFT
        • Update an NFT
      • Managed NFTs
        • Claim
        • Revoke
  • Examples
    • Zapier Integrations
      • Zapier + Viral Loops
      • Zapier + Github + OpenAI
      • Zapier + Github
      • Zapier + Mailchimp
      • Zapier + Shopify
      • Zapier + Calendly
      • Zapier + Hubspot
      • Zapier + Typeform
    • Underdog with Airtable
      • Create a Project
      • Create NFT on Form Submission
      • Send a Claim Link
      • Updating NFTs
    • Web3 Blog
    • Mint NFTs on iPhone
  • Use Cases
    • Solana Mobile
    • Parcl
Powered by GitBook
On this page
  • Registering Webhooks
  • Consuming Webhooks
  • Transaction Types
  • API Reference
  1. Guides

Webhooks

In this guide, we will look at how to register and consume webhooks to integrate your app with Underdog.

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.

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

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.

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

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

Transaction Types

Transaction Type
Details

project.create

Project was successfully created

project.nft.create

NFT in a Project was successfully created

project.nft.update

NFT in a Project was successfully updated

project.nft.revoke

NFT in a Project was successfully revoked

project.nft.burn

NFT in a Project was successfully burned

Example payload
{
  "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",
  }
}

API Reference

PreviousErrorsNextArchitecture

Last updated 2 years ago

Webhooks