curl --request PUT \
--url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"chain": "polygon",
"metadata": {
"name": "Sample NFT Collection",
"description": "This is a sample NFT collection",
"imageUrl": "https://www.crossmint.com/assets/crossmint/logo.png",
"symbol": "TOKEN"
},
"fungibility": "non-fungible",
"transferable": true,
"supplyLimit": 123,
"payments": {
"price": "<string>",
"recipientAddress": "<string>",
"currency": "<string>"
},
"subscription": {
"enabled": false
},
"reuploadLinkedFiles": true
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}"
payload = {
"chain": "polygon",
"metadata": {
"name": "Sample NFT Collection",
"description": "This is a sample NFT collection",
"imageUrl": "https://www.crossmint.com/assets/crossmint/logo.png",
"symbol": "TOKEN"
},
"fungibility": "non-fungible",
"transferable": True,
"supplyLimit": 123,
"payments": {
"price": "<string>",
"recipientAddress": "<string>",
"currency": "<string>"
},
"subscription": { "enabled": False },
"reuploadLinkedFiles": True
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'polygon',
metadata: {
name: 'Sample NFT Collection',
description: 'This is a sample NFT collection',
imageUrl: 'https://www.crossmint.com/assets/crossmint/logo.png',
symbol: 'TOKEN'
},
fungibility: 'non-fungible',
transferable: true,
supplyLimit: 123,
payments: {price: '<string>', recipientAddress: '<string>', currency: '<string>'},
subscription: {enabled: false},
reuploadLinkedFiles: true
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'chain' => 'polygon',
'metadata' => [
'name' => 'Sample NFT Collection',
'description' => 'This is a sample NFT collection',
'imageUrl' => 'https://www.crossmint.com/assets/crossmint/logo.png',
'symbol' => 'TOKEN'
],
'fungibility' => 'non-fungible',
'transferable' => true,
'supplyLimit' => 123,
'payments' => [
'price' => '<string>',
'recipientAddress' => '<string>',
'currency' => '<string>'
],
'subscription' => [
'enabled' => false
],
'reuploadLinkedFiles' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}"
payload := strings.NewReader("{\n \"chain\": \"polygon\",\n \"metadata\": {\n \"name\": \"Sample NFT Collection\",\n \"description\": \"This is a sample NFT collection\",\n \"imageUrl\": \"https://www.crossmint.com/assets/crossmint/logo.png\",\n \"symbol\": \"TOKEN\"\n },\n \"fungibility\": \"non-fungible\",\n \"transferable\": true,\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"subscription\": {\n \"enabled\": false\n },\n \"reuploadLinkedFiles\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"polygon\",\n \"metadata\": {\n \"name\": \"Sample NFT Collection\",\n \"description\": \"This is a sample NFT collection\",\n \"imageUrl\": \"https://www.crossmint.com/assets/crossmint/logo.png\",\n \"symbol\": \"TOKEN\"\n },\n \"fungibility\": \"non-fungible\",\n \"transferable\": true,\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"subscription\": {\n \"enabled\": false\n },\n \"reuploadLinkedFiles\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"polygon\",\n \"metadata\": {\n \"name\": \"Sample NFT Collection\",\n \"description\": \"This is a sample NFT collection\",\n \"imageUrl\": \"https://www.crossmint.com/assets/crossmint/logo.png\",\n \"symbol\": \"TOKEN\"\n },\n \"fungibility\": \"non-fungible\",\n \"transferable\": true,\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"subscription\": {\n \"enabled\": false\n },\n \"reuploadLinkedFiles\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "5263650e-6d43-4ed3-9e31-0cf593d076a4",
"metadata": {
"name": "Sample NFT Collection",
"description": "This is a sample NFT collection",
"imageUrl": "https://www.crossmint.com/assets/crossmint/logo.png",
"symbol": "TOKEN"
},
"fungibility": "non-fungible",
"onChain": {
"chain": "polygon",
"type": "erc-721"
},
"actionId": "5263650e-6d43-4ed3-9e31-0cf593d076a4",
"subscription": {
"enabled": true
}
}{
"error": true,
"message": "Invalid arguments or empty parameter <missing parameter>."
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "Please try again in a few minutes. If the issue still persists, contact Crossmint support."
}Create Collection (Idempotent)
Create a collection that you can mint NFTs/SFTs from. This API is idempotent, if you call it multiple times with the same ID, only one will be created.
API scope required: collections.create
curl --request PUT \
--url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"chain": "polygon",
"metadata": {
"name": "Sample NFT Collection",
"description": "This is a sample NFT collection",
"imageUrl": "https://www.crossmint.com/assets/crossmint/logo.png",
"symbol": "TOKEN"
},
"fungibility": "non-fungible",
"transferable": true,
"supplyLimit": 123,
"payments": {
"price": "<string>",
"recipientAddress": "<string>",
"currency": "<string>"
},
"subscription": {
"enabled": false
},
"reuploadLinkedFiles": true
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}"
payload = {
"chain": "polygon",
"metadata": {
"name": "Sample NFT Collection",
"description": "This is a sample NFT collection",
"imageUrl": "https://www.crossmint.com/assets/crossmint/logo.png",
"symbol": "TOKEN"
},
"fungibility": "non-fungible",
"transferable": True,
"supplyLimit": 123,
"payments": {
"price": "<string>",
"recipientAddress": "<string>",
"currency": "<string>"
},
"subscription": { "enabled": False },
"reuploadLinkedFiles": True
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'polygon',
metadata: {
name: 'Sample NFT Collection',
description: 'This is a sample NFT collection',
imageUrl: 'https://www.crossmint.com/assets/crossmint/logo.png',
symbol: 'TOKEN'
},
fungibility: 'non-fungible',
transferable: true,
supplyLimit: 123,
payments: {price: '<string>', recipientAddress: '<string>', currency: '<string>'},
subscription: {enabled: false},
reuploadLinkedFiles: true
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'chain' => 'polygon',
'metadata' => [
'name' => 'Sample NFT Collection',
'description' => 'This is a sample NFT collection',
'imageUrl' => 'https://www.crossmint.com/assets/crossmint/logo.png',
'symbol' => 'TOKEN'
],
'fungibility' => 'non-fungible',
'transferable' => true,
'supplyLimit' => 123,
'payments' => [
'price' => '<string>',
'recipientAddress' => '<string>',
'currency' => '<string>'
],
'subscription' => [
'enabled' => false
],
'reuploadLinkedFiles' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}"
payload := strings.NewReader("{\n \"chain\": \"polygon\",\n \"metadata\": {\n \"name\": \"Sample NFT Collection\",\n \"description\": \"This is a sample NFT collection\",\n \"imageUrl\": \"https://www.crossmint.com/assets/crossmint/logo.png\",\n \"symbol\": \"TOKEN\"\n },\n \"fungibility\": \"non-fungible\",\n \"transferable\": true,\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"subscription\": {\n \"enabled\": false\n },\n \"reuploadLinkedFiles\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"polygon\",\n \"metadata\": {\n \"name\": \"Sample NFT Collection\",\n \"description\": \"This is a sample NFT collection\",\n \"imageUrl\": \"https://www.crossmint.com/assets/crossmint/logo.png\",\n \"symbol\": \"TOKEN\"\n },\n \"fungibility\": \"non-fungible\",\n \"transferable\": true,\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"subscription\": {\n \"enabled\": false\n },\n \"reuploadLinkedFiles\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"polygon\",\n \"metadata\": {\n \"name\": \"Sample NFT Collection\",\n \"description\": \"This is a sample NFT collection\",\n \"imageUrl\": \"https://www.crossmint.com/assets/crossmint/logo.png\",\n \"symbol\": \"TOKEN\"\n },\n \"fungibility\": \"non-fungible\",\n \"transferable\": true,\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"subscription\": {\n \"enabled\": false\n },\n \"reuploadLinkedFiles\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "5263650e-6d43-4ed3-9e31-0cf593d076a4",
"metadata": {
"name": "Sample NFT Collection",
"description": "This is a sample NFT collection",
"imageUrl": "https://www.crossmint.com/assets/crossmint/logo.png",
"symbol": "TOKEN"
},
"fungibility": "non-fungible",
"onChain": {
"chain": "polygon",
"type": "erc-721"
},
"actionId": "5263650e-6d43-4ed3-9e31-0cf593d076a4",
"subscription": {
"enabled": true
}
}{
"error": true,
"message": "Invalid arguments or empty parameter <missing parameter>."
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "Please try again in a few minutes. If the issue still persists, contact Crossmint support."
}Authorizations
Obtained in the Crossmint developer console
Path Parameters
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 initial request.
Example: your-custom-identifier
Body
Blockchain you would like to use for this collection
aptos, arbitrum, arbitrum-sepolia, avalanche, avalanche-fuji, base, base-sepolia, bsc, chiliz, chiliz-spicy-testnet, ethereum, ethereum-sepolia, optimism, optimism-sepolia, polygon, polygon-amoy, shape, shape-sepolia, skale-nebula, skale-nebula-testnet, solana, soneium-minato-testnet, xai, xai-sepolia-testnet, zora, zora-sepolia "polygon"
Show child attributes
Show child attributes
Whether or not this collection is fungible. EVM and Solana collections may be set as semi-fungible.
non-fungible, semi-fungible Whether or not NFTs in this collection are transferable. Supported on EVM and Aptos chains. (For subscriptions must be set to false)
The maximum number of tokens that can be minted for this collection
Enable payments for this collection by setting price, recipientAddress and currency
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Any URLs in the metadata object will be resolved and reuploaded to IPFS [Default: true]
Was this page helpful?

