Crossmint
Search…
Collection Registration
Dynamically register a collection using Crossmint's Whitelabel API
Utilize the /collections endpoint in Crossmint's Whitelabel API to accept credit card or crypto payments for an NFT collection (such as Solana Candy Machines, Ethereum ERC721, ...) using Crossmint, you must first register it under your developer account.
You can do so manually from the Crossmint console, but you can also do so programmatically using the collection registration API. We provide two endpoints for this: one for creating a collection, and another for updating your existing collections.
Crossmint Whitelabel is offered as an enterprise solution and requires evaluation of your use case before approval. Reach out to [email protected] to get started.
post
https://www.crossmint.io/api/v1-alpha
/collections
Register your NFT collection with Crossmint
Candy Machine
ERC-721
CURL Example
import fetch from 'node-fetch';
​
const body = {
"chain": "solana",
"contractType": "candy-machine",
"args": {
"candyMachineId": "string"
},
"metadata": {
"title": "Bored Ape Yacht Club",
"description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs grating access to the Yacht Club community",
"imageUrl": "https://www.crossmint.io/_next/image?url=%2Fassets%2Fcrossmint%2Flogo.png&w=48&q=75",
"social": {
"twitter": "@crossmint",
"discord": "discord.gg/servername"
}
}
};
​
const response = await fetch('https://www.crossmint.io/api/collections', {
method: 'POST',
body: JSON.stringify(body),
headers: {
'X-PROJECT-ID': '<YOUR_PROJECT_ID>',
'X-CLIENT-SECRET': '<YOUR_CLIENT_SECRET>',
'Content-Type': 'application/json'
}
});
​
const data = await response.json();
const collectionId = data.collectionId;
import fetch from 'node-fetch';
​
const body = {
"chain": "ethereum",
"contractType": "erc-721",
"args": {
"contractAddress": "0xa88aA555A6c138dE6766f2e26c6f3bD1Bf2C12A2",
"mintFunction": {"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"crossmint","outputs":[],"stateMutability":"payable","type":"function"},
"toAddressMintArg": "_to",
"contractType": "erc-721"
},
"metadata": {
"title": "Test Create Collection API",
"description": "Test Description",
"imageUrl": "https://www.crossmint.io/_next/image?url=%2Fassets%2Fcrossmint%2Flogo.png&w=48&q=75",
"social": {
"twitter": "",
"discord": ""
}
}
};
​
const response = await fetch('https://www.crossmint.io/api/collections', {
method: 'POST',
body: JSON.stringify(body),
headers: {
'X-PROJECT-ID': '<YOUR_PROJECT_ID>',
'X-CLIENT-SECRET': '<YOUR_CLIENT_SECRET>',
'Content-Type': 'application/json'
}
});
​
const data = await response.json();
const collectionId = data.collectionId;
curl -v 'https://www.crossmint.io/api/v1-alpha1/collections' \
-X 'POST' \
-H 'X-PROJECT-ID: <YOUR_CLIENT_ID>' \
-H 'X-CLIENT-SECRET: <YOUR_CLIENT_SECRET>' \
-H "Content-Type: application/json" \
--data-binary @- << EOF
{
"chain": "solana",
"contractType": "candy-machine",
"args": {
"candyMachineId": "<CANDY_MACHINE_ID>"
},
"metadata": {
"title": "Bored Ape Yacht Club",
"description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs grating access to the Yacht Club community",
"imageUrl": "https://www.crossmint.io/_next/image?url=%2Fassets%2Fcrossmint%2Flogo.png&w=48&q=75",
"social": {
"twitter": "@twitter_handle",
"discord": "discord.gg/servername"
}
}
}
EOF
​
> {"collectionId":"557e0bbc-d51f-48f9-a3a1-36ea45324514"}
put
https://www.crossmint.io/api/v1-alpha
/collections
Update your collection information registered on Crossmint
Node.js Example
CURL Example
import fetch from 'node-fetch';
​
const body = {
"collectionId": "<COLLECTION_ID>",
"metadata": {
"title": "Bored Ape Yacht Club",
"description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs grating access to the Yacht Club community",
"imageUrl": "https://www.crossmint.io/_next/image?url=%2Fassets%2Fcrossmint%2Flogo.png&w=48&q=75",
"social": {
"twitter": "@twitter_handle",
"discord": "discord.gg/servername"
}
}
};
​
const response = await fetch('https://www.crossmint.io/api/collections', {
method: 'PUT',
body: JSON.stringify(body),
headers: {
'X-PROJECT-ID': '<YOUR_PROJECT_ID>',
'X-CLIENT-SECRET': '<YOUR_CLIENT_SECRET>',
'Content-Type': 'application/json'
}
});
curl 'https://www.crossmint.io/api/v1-alpha1/collections' \
-X 'PUT' \
-H 'X-PROJECT-ID: <YOUR_PROJECT_ID>' \
-H 'X-CLIENT-SECRET: <YOUR_CLIENT_SECRET>' \
-H "Content-Type: application/json" \
--data-binary @- << EOF
{
"collectionId": "<COLLECTION_ID>",
"metadata": {
"title": "Bored Ape Yacht Club",
"description": "The Bored Ape Yacht Club is a collection of 10,000 unique Bored Ape NFTs grating access to the Yacht Club community",
"imageUrl": "https://www.crossmint.io/_next/image?url=%2Fassets%2Fcrossmint%2Flogo.png&w=48&q=75",
"social": {
"twitter": "@twitter_handle",
"discord": "discord.gg/servername"
}
}
}
EOF
​
> {"collectionId":"557e0bbc-d51f-48f9-a3a1-36ea45324514"}
Copy link
Outline
post
Register your NFT collection with Crossmint
put
Update your collection information registered on Crossmint