Collections API
Overview
The Collections API allows you to create and manage NFT collections on the Solana blockchain. Each collection serves as a container for related NFTs with shared properties.
Create Collection
POST
/api/{network}/collections
Note: Replace {network} with either mainnet
or devnet
. Collections created on one network cannot be used on another.
Request Body
{
"name": "My Collection", // Required: Collection name
"symbol": "MYCOL", // Required: Collection symbol (max 10 chars)
"description": "Description", // Optional: Collection description
"image": "image_data", // Optional: URL or Base64 encoded image
// Optional metadata
"externalUrl": "https://...", // External website URL
"website": "https://...", // Official website
"x": "https://x.com/username", // x link
"discord": "https://discord.gg/username", // Discord invite link
"telegram": "https://t.me/username", // Telegram group link
"medium": "https://medium.com/username", // Medium link
"github": "https://github.com/username", // GitHub link
"royalties": 5, // Optional: Royalty percentage (0-100)
// Optional: Creator shares
"creators": [
{
"address": "wallet_address",
"share": 100 // Percentage share (total must be 100)
}
],
// Optional: Collection attributes
"attributes": [
{
"trait_type": "Category",
"value": "Art"
}
]
}
Response
{
"success": true,
"collection": {
"id": "collection_id",
"name": "My Collection",
"symbol": "MYCOL",
"description": "Description",
"image": "image_url",
"metadataUri": "uri",
"mintAddress": "address",
"owner": "wallet_address",
"externalUrl": "https://...",
"website": "https://...",
"twitter": "username",
"discord": "invite_url",
"telegram": "group_url",
"medium": "username",
"github": "username",
"royalties": 5,
"creators": [...],
"attributes": [...]
}
}
Get Collection
GET
/api/collections/{collectionId}
Response
{
"success": true,
"collection": {
// Same as create collection response
}
}
List Collections
GET
/api/collections
Query Parameters
limit
- Number of collections per page (default: 20)offset
- Pagination offset (default: 0)
Response
{
"success": true,
"collections": [
// Array of collection objects
],
"pagination": {
"total": 100,
"limit": 20,
"offset": 0
}
}
Important Notes
- •Collection symbols must be unique and contain only uppercase letters, numbers, and underscores
- •Creator shares must total exactly 100%
- •Collection metadata is stored on-chain and cannot be modified after creation
- •Images are automatically resized and optimized before storage