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": "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
  }
}

Authorizations

X-API-KEY
string
header
required

Obtained in the Crossmint developer console

Path Parameters

collectionId
string
required

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

Example:

"idempotent-collection-name"

Body

application/json
metadata
object
onChain
object

Onchain 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
Success
templateId
string
Example:

"20ed0963-0185-49af-b4a0-2de3169bb367"

metadata
object
onChain
object
supply
object