Create an NFT Collection
Collections are used to group and organize related NFT items.
To create an NFT collection, send a POST request to the /nft/nfts
endpoint of Playfix API.
Create an NFT collection.
POST
https://api.playfix.io/nft/nfts
Headers
Authorization*
String
Bearer <your_access_token>
Request Body
project*
String
The name
of the project that will contain the NFT collection.
standard*
String
The token creation standard all NFTs in this collection will follow. Set it to any of the following values:
NFT_STANDARD_ERC721
or
NFT_STANDARD_ERC1155
title*
String
The title of the NFT collection.
description
String
Short description of the NFT collection.
imageCoverCid
String
IPFS CID for the image to use as the NFT collection cover image when displayed in the user interface.
config*
Object
Configuration options for the NFT collection.
config.name*
String
Name of the token.
config.symbol
String
A shorthand symbol to refer to the NFT collection. Choose a short, uppercase word between 3-5 characters that is unique within your project.
config.itemPrice
String
A non-negative number representing the mint price of an NFT in this NFT collection.
config.burnable
String
Set to true
to allow NFT burning.
config.pausable
String
Set to true
to allow pausing of NFT transfer.
config.ownerAddress*
String
Wallet address of the contract owner, which receives the NFT collection.
network*
String
Name of the blockchain network where the NFT collection contract will be deployed.
The following example creates a new NFT collection titled "Carz".
Example cURL API Call
Example Python API Call
Request Body
project
- The name of the project that will contain the token. This should be the value ofname
from a project you created earlier.standard
- The token creation standard all NFTs in this collection will follow. Set it to any of the following values:NFT_STANDARD_ERC721
: The NFT collection uses the ERC-721 token standard.NFT_STANDARD_ERC1155
: The NFT collection uses the ERC-1155 token standard.
title
- Title of the NFT collection.description
- Short description of the NFT collection.imageCoverCid
- IPFS CID for the image to use as the NFT collection cover image when displayed in the user interface.config
- Configuration options for the NFT collection.name
- Name of the token.symbol
- A shorthand symbol to refer to the NFT collection. Choose a short, uppercase word between 3-5 characters that is unique within your project.itemPrice
- A non-negative number representing the mint price of an NFT item in this NFT collection.burnable
(boolean)- Set totrue
to allow NFT burning.pausable
(boolean)- Set totrue
to allow pausing of NFT transfer.ownerAddress
- The wallet address of the contract owner. The owner address receives the NFT items initially and has additional privileges.
network
- Name of the blockchain network where the NFT collection contract will be deployed. You can set this to any of the following network values, depending on your preference:NETWORK_ETHEREUM
: Ethereum mainnet.NETWORK_ETHEREUM_RINKEBY
: Ethereum Gorli testnet. For testing purposes only.NETWORK_POLYGON
: Polygon mainnet.NETWORK_POLYGON_MUMBAI
: Polygon Mumbai testnet. For testing purposes only.
Response
Response Fields
name
- A unique name of the NFT collection, automatically generated by Playfix. It begins with "nfts/
" followed by a ULID.imageCoverUrl
- An automatically generated URL to an IPFS gateway that fetches the cover image.itemCount
- The number of NFTs in the collection.baseUri
- The base URI (uniform resource identifier) for all NFTs in the collection.contractAddress
- Address of the NFT collection contract when it is deployed. This will be empty for a start.deployTxHash
- The transaction hash of the NFT collection contract deployment. This will be empty for a start.
Last updated