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

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

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