Update an NFT

Partial Update an NFT

Partial Update an NFT

patch

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
descriptionstringOptional

Description stored in the metadata

Example: This is my first NFT
imagestringOptional

Image URL for your NFT

Example: https://example.com/image.png
animationUrlstringOptional

Animation URL for your NFT

Example: https://example.com/animation.mp4
Responses
200
Returns an Updated NFT
application/json
patch
PATCH /v2/projects/:transferable/:projectId/nfts/:nftId HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer JWT
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"
    }
}'
Response
{
    "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

Update an NFT

put

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
descriptionstringOptional

Description stored in the metadata

Example: This is my first NFT
imagestringRequired

Image URL for your NFT

Example: https://example.com/image.png
animationUrlstringOptional

Animation URL for your NFT

Example: https://example.com/animation.mp4
Responses
200
Returns an Updated NFT
application/json
put
PUT /v2/projects/:transferable/:projectId/nfts/:nftId HTTP/1.1
Host: api.underdogprotocol.com
Authorization: Bearer JWT
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"
    }
}'
Response
{
    "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