Update an NFT
Partial Update an NFT
This endpoint allows you to perform a partial update on an NFT.
Authorizations
Path parameters
transferablestringRequired
Value must be either 't' for transferable or 'n' for non-transferable
projectIdintegerRequired
nftIdintegerRequired
NFT ID
Body
descriptionstringOptionalExample:
Description stored in the metadata
This is my first NFTimagestringOptionalExample:
Image URL for your NFT
https://example.com/image.pnganimationUrlstringOptionalExample:
Animation URL for your NFT
https://example.com/animation.mp4Responses
200
Returns an Updated NFT
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
patch
/v2/projects/:transferable/:projectId/nfts/:nftIdPATCH /v2/projects/:transferable/:projectId/nfts/:nftId HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 181
{
"description": "This is my first NFT",
"image": "https://example.com/image.png",
"attributes": {
"Points": "40000",
"Nickname": "LeGoat"
},
"animationUrl": "https://example.com/animation.mp4"
}{
"name": "NFT #1",
"symbol": "NFT",
"description": "This is my first NFT",
"image": "https://example.com/image.png",
"animationUrl": "https://example.com/animation.mp4",
"attributes": {
"Points": "40000",
"Nickname": "LeGoat"
},
"id": 1,
"projectId": 1,
"transferable": true,
"mintAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
"ownerAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
"claimerAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
"status": "text"
}Example
curl --location --request PATCH 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts/1' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"attributes": {
"points": "40000"
}
}'const axios = require('axios');
let data = JSON.stringify({
"attributes": {
"points": "40000"
}
});
let config = {
method: 'patch',
url: 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts/1',
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);
});
{
"id": 1,
"status": "confirmed",
"mintAddress": "Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi",
"name": "LeGoat",
"image": "https://underdog-test-bucket-dev.s3.amazonaws.com/Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi/image.png",
"attributes": {
"points": "40000"
}
}Update an NFT
This endpoint allows you to perform an update on an NFT.
Authorizations
Path parameters
transferablestringRequired
Value must be either 't' for transferable or 'n' for non-transferable
projectIdintegerRequired
nftIdintegerRequired
NFT ID
Body
descriptionstringOptionalExample:
Description stored in the metadata
This is my first NFTimagestringRequiredExample:
Image URL for your NFT
https://example.com/image.pnganimationUrlstringOptionalExample:
Animation URL for your NFT
https://example.com/animation.mp4Responses
200
Returns an Updated NFT
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
put
/v2/projects/:transferable/:projectId/nfts/:nftIdPUT /v2/projects/:transferable/:projectId/nfts/:nftId HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 181
{
"description": "This is my first NFT",
"image": "https://example.com/image.png",
"attributes": {
"Points": "40000",
"Nickname": "LeGoat"
},
"animationUrl": "https://example.com/animation.mp4"
}{
"name": "NFT #1",
"symbol": "NFT",
"description": "This is my first NFT",
"image": "https://example.com/image.png",
"animationUrl": "https://example.com/animation.mp4",
"attributes": {
"Points": "40000",
"Nickname": "LeGoat"
},
"id": 1,
"projectId": 1,
"transferable": true,
"mintAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
"ownerAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
"claimerAddress": "EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp",
"status": "text"
}Example
curl --location --request PUT 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts/1' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "LeKareem",
"image": "https://upload.wikimedia.org/wikipedia/commons/a/a0/Kareem_Abdul-Jabbar_May_2014.jpg",
"attributes": {
"points": "40000"
}
}'const axios = require('axios');
let data = JSON.stringify({
"name": "LeKareem",
"image": "https://upload.wikimedia.org/wikipedia/commons/a/a0/Kareem_Abdul-Jabbar_May_2014.jpg",
"attributes": {
"points": "40000"
}
});
let config = {
method: 'put',
url: 'https://dev.underdogprotocol.com/v2/projects/n/4/nfts/1',
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);
});
{
"id": 1,
"status": "confirmed",
"mintAddress": "Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi",
"name": "LeGoat",
"image": "https://underdog-test-bucket-dev.s3.amazonaws.com/Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi/image.png",
"attributes": {
"points": "40000"
}
}Last updated