Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.0

Resync NFT metadata

GEThttps://deep-index.moralis.io/api/v2/nft/:address/:token_id/metadata/resync

Resync the metadata for an NFT

  • The metadata flag will request the NFT's metadata from an already existing token_uri
  • The uri (default) flag will fetch the latest token_uri from the given NFT contract address. In sync mode the metadata will also be fetched
  • The sync mode will make the endpoint synchronous so it will wait for the task to be completed before responding
  • The async mode (default) will make the endpoint asynchronous so we will wait for the task to be completed before responding
PATH PARAMS
addressstringrequired
The address of the NFT contract
token_idstringrequired
The ID of the token
QUERY PARAMS
chainstring
The chain to query
flagstring
The type of resync to operate
modestring
To define the behaviour of the endpoint
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.EvmApi.nft.reSyncMetadata({
"chain": "0x1",
"flag": "uri",
"mode": "async",
"address": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB",
"tokenId": "1"
});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
{
"status": ""
}