Collection Management API
Overview
Endpoints for creating and managing NFT collections. These endpoints enable you to deploy and interact with ERC721 or ERC1155 smart contracts.
Common Use Cases
Deploy new NFT collections (ERC721/ERC1155)
Retrieve collection details and metadata
Monitor collection statistics
Manage collection settings
Create Collection
Deploy a new NFT collection contract.
POST api.bloclabs.com/v1/create-collection
Request
{
"name": "My NFT Collection",
"symbol": "MNFT",
"contract_type": "ERC721", // "ERC721" or "ERC1155"
"metadata": {
"description": "Collection description",
"external_link": "https://mycollection.com",
"seller_fee_basis_points": 250, // 2.5% royalty
"fee_recipient": "0x123...abc"
},
"owner_address": "0x456...def"
}
Response
{
"status": "success",
"data": {
"collection_id": "col_xyz789",
"contract_address": "0x789...def",
"name": "My NFT Collection",
"symbol": "MNFT",
"contract_type": "ERC721",
"owner_address": "0x456...def",
"created_at": "2024-03-15T10:00:00Z",
"transaction_hash": "0xabc...123"
}
}
Get Collection
Retrieve details of a specific NFT collection.
GET api.bloclabs.com/v1/nfts/collection
Query Parameters
{
"contract_address": "0x789...def"
}
Response
{
"status": "success",
"data": {
"collection_id": "col_xyz789",
"contract_address": "0x789...def",
"name": "My NFT Collection",
"symbol": "MNFT",
"contract_type": "ERC721",
"owner_address": "0x456...def",
"metadata": {
"description": "Collection description",
"external_link": "https://mycollection.com",
"seller_fee_basis_points": 250,
"fee_recipient": "0x123...abc"
},
"stats": {
"total_supply": 1000,
"num_owners": 500,
"floor_price": "0.5 ETH",
"total_volume": "100 ETH"
}
}
}
Error Responses
Invalid Contract Type
{
"status": "error",
"message": "Invalid contract type specified",
"code": "INVALID_CONTRACT_TYPE",
"data": {
"supported_types": ["ERC721", "ERC1155"]
}
}
Deployment Failed
{
"status": "error",
"message": "Failed to deploy collection contract",
"code": "DEPLOYMENT_FAILED",
"data": {
"reason": "Insufficient funds for gas"
}
}
Collection Not Found
{
"status": "error",
"message": "Collection not found",
"code": "COLLECTION_NOT_FOUND"
}
Notes
Collection creation requires gas fees
Collection names must be unique
Royalty fees are set in basis points (100 = 1%)
Contract deployment may take a few minutes
Collection metadata should follow OpenSea metadata standards
Last updated