# Update an NFT

## Partial Update an NFT

{% openapi src="<https://1812349639-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfCqNbNtOQjchD3WfXFA%2Fuploads%2FgiPrImYB9aPmeW2JefRr%2Fswagger.json?alt=media&token=ba7a249c-f47f-488d-8358-e430bd040504>" path="/v2/projects/:transferable/:projectId/nfts/:nftId" method="patch" expanded="false" %}
[swagger.json](https://1812349639-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfCqNbNtOQjchD3WfXFA%2Fuploads%2FgiPrImYB9aPmeW2JefRr%2Fswagger.json?alt=media\&token=ba7a249c-f47f-488d-8358-e430bd040504)
{% endopenapi %}

### Example

{% tabs %}
{% tab title="cURL" %}

```bash
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"
    }
}'
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
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);
});

```

{% endtab %}
{% endtabs %}

{% code title="Response" %}

```json
{
    "id": 1,
    "status": "confirmed",
    "mintAddress": "Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi",
    "name": "LeGoat",
    "image": "https://underdog-test-bucket-dev.s3.amazonaws.com/Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi/image.png",
    "attributes": {
        "points": "40000"
    }
}
```

{% endcode %}

## Update an NFT

{% openapi src="<https://1812349639-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfCqNbNtOQjchD3WfXFA%2Fuploads%2FgiPrImYB9aPmeW2JefRr%2Fswagger.json?alt=media&token=ba7a249c-f47f-488d-8358-e430bd040504>" path="/v2/projects/:transferable/:projectId/nfts/:nftId" method="put" expanded="false" %}
[swagger.json](https://1812349639-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfCqNbNtOQjchD3WfXFA%2Fuploads%2FgiPrImYB9aPmeW2JefRr%2Fswagger.json?alt=media\&token=ba7a249c-f47f-488d-8358-e430bd040504)
{% endopenapi %}

### Example

{% tabs %}
{% tab title="cURL" %}

```bash
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"
    }
}'
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
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);
});

```

{% endtab %}
{% endtabs %}

{% code title="Response" %}

```json
{
    "id": 1,
    "status": "confirmed",
    "mintAddress": "Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi",
    "name": "LeGoat",
    "image": "https://underdog-test-bucket-dev.s3.amazonaws.com/Dic1tC9yBhaDerQpV8ZBAsruBUKQsRWtCWysG965ADWi/image.png",
    "attributes": {
        "points": "40000"
    }
}
```

{% endcode %}
