Create an NFT
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"
}
Last updated