Create an NFT
This endpoint allows you to create a new NFT.
Value must be either 't' for transferable or 'n' for non-transferable
Name stored as on-chain metadata
NFT #1Symbol stored as on-chain metadata
NFTDescription stored in the metadata
This is my first NFTImage URL for your NFT
https://example.com/image.pngAnimation URL for your NFT
https://example.com/animation.mp4Wallet address that will receive the NFT
EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDpPattern: ^[A-HJ-NP-Za-km-z1-9]*$If true, will update the NFT if one with the same owner / claimer exists
Returns an array of NFTs with upserted metadata
Name stored as on-chain metadata
NFT #1Symbol stored as on-chain metadata
NFTDescription stored in the metadata
This is my first NFTImage URL for your NFT
https://example.com/image.pngAnimation URL for your NFT
https://example.com/animation.mp4Unique ID for an NFT in a Project
The ID of the Project the NFT is part of
Whether or not the NFT can be transferred based on the Project its a part of
Address for the NFT's or token's mint account
EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDpPattern: ^[A-HJ-NP-Za-km-z1-9]*$Wallet addres for the NFT's owner
EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDpPattern: ^[A-HJ-NP-Za-km-z1-9]*$Wallet address allowed to claim the NFT
EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDpPattern: ^[A-HJ-NP-Za-km-z1-9]*$Unauthorized
Forbidden
Not Found
Example
curl --location --request POST 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "LeGoat",
"image": "https://sportshub.cbsistatic.com/i/r/2023/02/08/aa0a798f-6268-41ba-9be4-ea4ee03fd817/thumbnail/1200x675/421458d6419a36da2aaad75e10b2e347/king.jpg",
"attributes": {
"points": "38390"
}
}'const axios = require('axios');
let data = JSON.stringify({
"name": "LeGoat",
"image": "https://sportshub.cbsistatic.com/i/r/2023/02/08/aa0a798f-6268-41ba-9be4-ea4ee03fd817/thumbnail/1200x675/421458d6419a36da2aaad75e10b2e347/king.jpg",
"attributes": {
"points": "38390"
}
});
let config = {
method: 'post',
url: 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts',
headers: {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Last updated