Create Collection
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/collections/ \
--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/"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/"
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("POST", 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.post("https://staging.crossmint.com/api/2022-06-09/collections/")
.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/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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."
}NFT Collections
Create Collection
Create a collection that you can mint NFTs/SFTs from
API scope required: collections.create
POST
/
2022-06-09
/
collections
/
Create Collection
curl --request POST \
--url https://staging.crossmint.com/api/2022-06-09/collections/ \
--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/"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/"
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("POST", 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.post("https://staging.crossmint.com/api/2022-06-09/collections/")
.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/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
Body
application/json
Blockchain you would like to use for this collection
Available options:
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 Example:
"polygon"
Show child attributes
Show child attributes
Whether or not this collection is fungible. EVM and Solana collections may be set as semi-fungible.
Available options:
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?
⌘I

