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
  1. Resources
  2. V1
  3. NFTs

Create an NFT

PreviousList all NFTsNextRetrieve an NFT

Last updated 2 years ago

Example

curl --request POST \
  --url https://api.underdogprotocol.com/v1/nfts \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer {token}" \
  --data '
{
        "collectionAddress": "6TpvoRVJfJe6VdqfML4yjvp9Qc49LuVNb7uzWtPRZzVV",
        "name": "Degenerate Ape",
        "image": "https://arweave.net/6TnZgDc7xDFV_0UFyPgfq2wn6UfRv8-DJgwVwoHfLG4"
}'
import axios from 'axios';

const createNft = async () => {
  try {
    const response = await axios.post('https://api.underdogprotocol.com/v1/nfts', {
      collectionAddress: '6TpvoRVJfJe6VdqfML4yjvp9Qc49LuVNb7uzWtPRZzVV',
      name: 'Degenerate Ape',
      image: 'https://arweave.net/6TnZgDc7xDFV_0UFyPgfq2wn6UfRv8-DJgwVwoHfLG4'
    }, {
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${token}`
      }
    });

    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
}
Response
{
    "mintAddress": "DBqMFAaE8rxJ5emotUywQLWJStGMgGRo3vH52dcKApe6",
    "transactionId": "2eebff8e-67a6-4a30-b7e3-7cec2d3f2160"
}
  • POSTCreate an NFT
  • Example

Create an NFT

post

This endpoint allows you to create a new NFT.

Authorizations
Body
namestringRequired

Name for you NFT

descriptionstringOptional

Description for your NFT

imagestringRequired

URL pointing to an image for your NFT

managedbooleanOptional

Mints the NFT in a Token Manager

upsertbooleanOptional

Allows updating an NFT if one already exists with the same owner and collection address

ownerAddressstringOptional

Wallet Address of the owner of the NFT

collectionAddressstringOptional

Mint address for the NFT Collection

Responses
200
Returns the upserted NFT
application/json
202Success
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
post
POST /v1/nfts HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 188

{
  "name": "text",
  "description": "text",
  "image": "text",
  "attributes": {
    "Overall": "0",
    "Clout": "0",
    "Credibility": "0"
  },
  "managed": true,
  "upsert": true,
  "ownerAddress": "text",
  "collectionAddress": "text"
}
{
  "name": "NFT #1",
  "symbol": "NFT",
  "description": "This is my first NFT",
  "image": "https://example.com/image.png",
  "animationUrl": "https://example.com/animation.mp4",
  "attributes": {
    "Points": "40000",
    "Nickname": "LeGoat"
  },
  "id": 1,
  "projectId": 1,
  "transferable": true,
  "mintAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
  "ownerAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
  "claimerAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
  "status": "text"
}