Create an NFT
This endpoint allows you to create a new NFT.
Name for you NFT
Description for your NFT
URL pointing to an image for your NFT
Mints the NFT in a Token Manager
Allows updating an NFT if one already exists with the same owner and collection address
Wallet Address of the owner of the NFT
Mint address for the NFT Collection
Returns the upserted NFT
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 --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);
}
}
Last updated