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

Subsequent reqeuests to this endpoint with the same id in the path will not mint additional NFTs.

Furthermore, the success responses (with status code 200) will be different once the initial request has completed and includes the metadata for the minted NFT.

{
    "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

Obtained in the Crossmint developer console

Path Parameters

collectionId
string
required

This is the identifier for the collection related to the request. Every project has default collections: default-solana and default-polygon.

The create-collection API will result in collections with UUID formatted collectionId. Example: 9c82ef99-617f-497d-9abb-fd355291681b

The create-collection-idempotent API allows you to specify an arbitrary identifier during the intitial request. Example: your-custom-identifer

id
string
required

Custom ID of the NFT, which is used as an idempotency key

Example:

"my-idempotency-key"

Body

application/json

Response

200
application/json
The request has been accepted.

The response is of type object.