Skip to content

Instantly share code, notes, and snippets.

@dmulvi
Created February 9, 2024 20:17
Show Gist options
  • Save dmulvi/b1d6617176e046030ed2fe005c6b918a to your computer and use it in GitHub Desktop.
Save dmulvi/b1d6617176e046030ed2fe005c6b918a to your computer and use it in GitHub Desktop.
Edit NFT Metadata
const options = {
method: "PATCH",
headers: {
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
metadata: {
name: "Crossmint NFT #1",
description: "Super Awesome NFT #1",
image: "ipfs://QmVhAkiT3XCPQUaZKHootfEfixmKVqSiq5Y7uVPZyFGQXw",
},
}),
};
const baseUrl = "https://staging.crossmint.com/api";
const collectionId = "YOUR_COLLECTION_ID";
const nftId = "YOUR_NFT_ID";
fetch(
`${baseUrl}/2022-06-09/collections/${collectionId}/nfts/${nftId}`,
options
)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment