Create a token template, that NFTs or SFTs may be minted from
API scope required: nfts.create
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}/templates \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"metadata": {
"name": "My template",
"image": "https://www.crossmint.com/assets/crossmint/logo.png",
"description": "A new collection with its own dedicated smart contract",
"symbol": "<string>"
},
"onChain": {
"tokenId": "1"
},
"supply": {
"limit": 10
},
"reuploadLinkedFiles": true
}'
{
"templateId": "20ed0963-0185-49af-b4a0-2de3169bb367",
"metadata": {
"name": "My Token",
"image": "ipfs://QmaToZn4VEjF7q4CAudPaNka6AD484xuuEZSXmTLJPDLVE",
"description": "Sample Token Template",
"symbol": "A shorthand identifier for the token (Solana only)"
},
"onChain": {
"tokenId": 1
},
"supply": {
"limit": 1,
"minted": 0
}
}
Obtained in the Crossmint developer console
The ID of the named collection, used to create new tokens
"idempotent-collection-name"
Success
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}/templates \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"metadata": {
"name": "My template",
"image": "https://www.crossmint.com/assets/crossmint/logo.png",
"description": "A new collection with its own dedicated smart contract",
"symbol": "<string>"
},
"onChain": {
"tokenId": "1"
},
"supply": {
"limit": 10
},
"reuploadLinkedFiles": true
}'
{
"templateId": "20ed0963-0185-49af-b4a0-2de3169bb367",
"metadata": {
"name": "My Token",
"image": "ipfs://QmaToZn4VEjF7q4CAudPaNka6AD484xuuEZSXmTLJPDLVE",
"description": "Sample Token Template",
"symbol": "A shorthand identifier for the token (Solana only)"
},
"onChain": {
"tokenId": 1
},
"supply": {
"limit": 1,
"minted": 0
}
}