Update an NFT
There are two API methods to update an NFT.
PATCH allows for partial updates so you can just pass in the image or the attribute you want to update
PUT requires the full NFT metadata to be passed in and updates the full metadata
If you just want to make a change to a single attribute or just update the image, the PATCH endpoint should be sufficient.
If you are trying to remove attributes, you'll need to use the PUT endpoint to pass in the new attribute body.
Partial Update an NFT
This endpoint allows you to perform an update on an NFT.
Address for the NFT's or token's mint account
EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp
Pattern: ^[A-HJ-NP-Za-km-z1-9]*$
Description stored in the metadata
This is my first NFT
Image URL for your NFT
https://example.com/image.png
PUT /v1/nfts/:mintAddress HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 130
{
"description": "This is my first NFT",
"image": "https://example.com/image.png",
"attributes": {
"Points": "40000",
"Nickname": "LeGoat"
}
}
{
"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 -X PATCH \
--url https://api.underdogprotocol.com/v1/nfts/7eYfyPfnGzxp8A9TrQJEpKwVCC8nP9viHRRGJ89WzFJB \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
-d '
{
"attributes": {
"best player": "Tyrese Haliburton"
}
}'
Update an NFT
This endpoint allows you to perform a partial update on an NFT.
Address for the NFT's or token's mint account
EBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp
Pattern: ^[A-HJ-NP-Za-km-z1-9]*$
Description stored in the metadata
This is my first NFT
Image URL for your NFT
https://example.com/image.png
PATCH /v1/nfts/:mintAddress HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 130
{
"description": "This is my first NFT",
"image": "https://example.com/image.png",
"attributes": {
"Points": "40000",
"Nickname": "LeGoat"
}
}
{
"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 -X PUT \
--url https://api.underdogprotocol.com/v1/nfts/7eYfyPfnGzxp8A9TrQJEpKwVCC8nP9viHRRGJ89WzFJB \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
-d '
{
"name": "Sacramento Kings",
"description": "",
"image": "https://arweave.net/U0PFVZ_LszARt7OgfSiLl--OrRmczn0cNAjw4tYerVQ",
"attributes": {
"best player": "Tyrese Haliburton"
}
}'
Last updated