POST
/
2022-06-09
/
collections
/
{collectionId}
/
templates
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": "<string>",
    "image": "<string>",
    "description": "<string>"
  },
  "onChain": {
    "tokenId": "1"
  },
  "supply": {
    "limit": 10
  },
  "reuploadLinkedFiles": true
}'
{
  "templateId": "20ed0963-0185-49af-b4a0-2de3169bb367",
  "metadata": {
    "name": "My Token",
    "image": "https://cdn.io/image.png",
    "description": "Sample Token Template"
  },
  "onChain": {
    "tokenId": 1
  },
  "supply": {
    "limit": 1,
    "minted": 123
  }
}

Authorizations

X-API-KEY
string
headerrequired

Obtained in the Crossmint developer console

Path Parameters

collectionId
string
required

The ID of the named collection, used to create new tokens

Body

application/json
metadata
object

See https://docs.crossmint.com/docs/metadata for more info

onChain
object

On-chain details

supply
object

Supply details

reuploadLinkedFiles
boolean

Any URLs in the metadata object will be resolved and reuploaded to IPFS [Default: true]

Response

200 - application/json
templateId
string
metadata
object
onChain
object
supply
object