Create an NFT

post
https://api.underdogprotocol.com
/v1/nfts
Create an NFT

This endpoint allows you to create a new NFT.

Parameters
No parameters
Body
Example
Schema
{
"name": "string",
"description": "string",
"image": "string",
"attributes": {
"Overall": "0",
"Clout": "0",
"Credibility": "0"
},
"managed": true,
"upsert": true,
"ownerAddress": "string",
"collectionAddress": "string"
}
Responses
200: OK
Returns the upserted NFT
202: Accepted
401: Unauthorized
Unauthorized
403: Forbidden
Forbidden
404: Not Found
Not Found

Example

cURL
JavaScript
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"
}