POST
/
2022-06-09
/
collections
/
{collectionId}
/
nfts
curl --request POST \
  --url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}/nfts \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "recipient": "email:replaceme@youruser.com:solana",
  "compressed": true,
  "reuploadLinkedFiles": true,
  "metadata": {
    "name": "My first Mint API NFT",
    "image": "https://www.crossmint.com/assets/crossmint/logo.png",
    "description": "My NFT created via the mint API!",
    "animation_url": "<string>",
    "attributes": [
      {
        "display_type": "",
        "trait_type": "<string>",
        "value": "<string>"
      }
    ]
  }
}'
{
    "id": "a9c57776-8f0c-4dfc-8a81-06909439234e",
    "onChain": {
        "status": "pending",
        "chain": "polygon",
        "contractAddress": "0xe7Ad5c85B14b5bedc6911c148cfbB52B2744531E"
    },
    "actionId": "a9c57776-8f0c-4dfc-8a81-06909439234e"
}
{
    "id": "a9c57776-8f0c-4dfc-8a81-06909439234e",
    "onChain": {
        "status": "pending",
        "chain": "polygon",
        "contractAddress": "0xe7Ad5c85B14b5bedc6911c148cfbB52B2744531E"
    },
    "actionId": "a9c57776-8f0c-4dfc-8a81-06909439234e"
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

collectionId
string
default:
default
required

Every project can mint to their pre-built collections, or use the create-collection endpoint

Body

application/json
recipient
string
default:
email:replaceme@youruser.com:solana
required

Recipient address in the format of <chain>:<address> or <br> email:<email_address>:<chain>. See https://docs.crossmint.com/docs/recipients for more info.

metadata
required

Note: This field is optional if base uri is set.

compressed
boolean

(Optional)(Solana only) Use NFT compression for cheaper mint costs [Default: true]

reuploadLinkedFiles
boolean

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

Response

200
application/json
Success.
id
string
required
onchain
object
required