Create an NFT
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);
});
Response
{
"transactionId": "c3f66040-89f2-4692-9987-e7d0465179ab",
"mintAddress": "Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi"
}
Last updated