Created
February 9, 2024 20:17
-
-
Save dmulvi/b1d6617176e046030ed2fe005c6b918a to your computer and use it in GitHub Desktop.
Edit NFT Metadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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