Mint and deliver the NFTs

Finally, deliver the NFTs to your users

Mint an NFT

We're almost there! Open your terminal and copy the following code:

CLIENT_SECRET=<fill_me>
PROJECT_ID=<fill_me>
MY_TEST_EMAIL=<fill_me>

curl --header "x-client-secret: $CLIENT_SECRET" \
  --header "x-project-id: $PROJECT_ID" \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{
    "metadata": {
      "name": "Crossmint Mint API Test",
      "image": "https://www.crossmint.com/assets/crossmint/logo.png",
      "description": "Test NFT created using the Crossmint Minting API"
     },
     "recipient": "email:'"$MY_TEST_EMAIL"':polygon"
    }' \
https://staging.crossmint.com/api/2022-06-09/collections/default-polygon/nfts

Before pressing Enter, fill in:

  • CLIENT_SECRET and PROJECT_ID with the values obtained in the prior step
  • MY_TEST_EMAIL with an email address you own

What this API call does is:

  1. It ensures there's a smart contract deployed for your NFT
  2. It uploads your metadata into a file in IPFS (decentralized storage)
  3. It mints an NFT on a blockchain of your choice
  4. It creates a crypto wallet for the email you specify, if one didn't yet exist
  5. It sends the NFT to that wallet

With this in mind, you can now press Enter and run the command. After a few seconds, it should return an object containing an identifier for your NFT amongst other information. Save it for the next step.

📘

For the idempotent version of the API, read this

Check mint status of a specific NFT

Get a list of status and associated information for one specific NFT operation.

The default collectionIDs upon sign up (ie. if you haven't proactively are "default-polygon" or "default-solana", depending on the chain where it was minted.

curl --request GET \
     --url https://staging.crossmint.com/api/2022-06-09/collections/YOUR_COLLECTION_ID/nfts/YOUR_NFT_ID

Check mint status of a collection ID

Get a list of status and associated information for all mint operations in a given collection.

The default collectionIDs upon sign up (ie. if you haven't proactively are "default-polygon" or "default-solana", depending on which chain the NF

curl --request GET \
     --url 'https://staging.crossmint.com/api/2022-06-09/collections/YOUR_COLLECTION_ID/nfts?page=PAGE_NUMBER&perPage=ITEMS_PER_PAGE'