Collections
A collection is a way to create a group of individual NFTs with similar attributes. All the NFTs belonging to the same collection share attributes like the artist, year of creation, social networks, name of the collection, etc.
name
: (Mandatory) Collection name. The collection name is internal to your Tangocrypto account. This is just a way to identify different collections.description
: (Optional) Collection description. The collection description is internal to your Tangocrypto account.url
: (Optional) URL of the website where the collection is going to be sold.payout_address
:(Mandatory) Wallet address that is going to receive the payments of the NFT sale. This should be the wallet address of the seller.policy
: (Mandatory) Policy configuration for every NFT in the collection. When you create a new collection we do several steps in the background; we create a new key pair (public verification key/private signing key), a policy script and the policy id. Then during the sale process, all the tokens are minted with the same policy script and the policy id is attached permanently to the NFT.lock
: (Mandatory)true
|false
Defines if the policy will be locked or not. If you selectfalse
then you are not required to choose a date and time to lock the policy, therefore the policy will be open and you can be minting NFTs under this policy forever. If you set this parameter totrue
then you have to specify alocktime
date.locktime
: (Optional) Locktime date in ISO 8601 formatyyyy-mm-ddThh:mm:ss[.mmm]
. It defines how long you'll be able to mint NFTs for the collection. The policy will lock after that date, and you won't be able to mint more NFTs using the same policy id (even if you use the same key). Hours and minutes are optional; if you set it to2022-02-24
, it will automatically fill it with 0s, for example,2022-02-24T00:00:00.000Z
.Take into consideration the desirability and size of your collection before setting this date and leave enough time for selling the NFTs. There is no limited time for the future.
metadata
: (Optional) Metadata tags for the collection. The values between< >
mean that they are tags. A tag is simply a variable that we will evaluate its value when you mint the NFT. You can use the metadata tag to define common attributes shared by all the NFTs in the collection, like the name, copyright, date issued, artist name, social media links, etc. Using metadata tags is not mandatory because you can define all the attributes while creating the individual NFTs.asset_name
: (Mandatory) Metadata tag for the NFT asset name.name
: (Mandatory) Metadata tag for the NFT name.description
: (Optional) Metadata tag for the NFT description.media_type
: (Optional) Metadata tag for the media type.files
: (Optional) array of files used forfiles
. This is used when you want to create an NFT with different file formats. For example, you can create several audio files and add them to the metadata.media_type
: (Optional) Metadata tag for the media type.name
: (Optional) Metadata tag for the file name.src
:<file_link>
(Optional) Image inbase64
string to be hosted on IPFS.
attributes
: (Optional) Custom attributes or traits for an NFT. You can create 2 types of attributes, fixed or variables.- fixed: Use fixed attributes when you want every NFT in the collection to include the same key-value pair, and you don't want to define them NFT by NFT. For example, if you set a key with Ticker and the value with TANGO, then every NFT in your collection will have the attribute
"Ticker":"TANGO"
. Other fixed attributes can be artist name, project name, Twitter, Discord, copyright etc. - variables: Use variable attributes when you want every NFT in the collection to include the same key but with a different value. We use tags to represent a variable value, and they are surrounded by angle brackets. For example, if you set a key with accessory and the value with
< accessory>
, then every NFT will have the key accessory, and you'll have to define a tag and provide its value during the NFT creation. This allows you to change the value for individual NFTs during their creation while maintaining a uniform set of attributes across the collection.

Colection definition
The NFT Metadata Standard for Native Tokens is defined in CIP-0025. For a full reference visit https://github.com/cardano-foundation/CIPs/tree/master/CIP-0025
HTTP
cURL
NodeJs
POST /<app-id>/v1/nft/collections HTTP/1.1
Host: cardano-testnet.tangocrypto.com
x-api-key: <your-api-key>
Content-Type: application/json
{
"name": "Tangocrypto Collection",
"description": "Tangocrypto collection description",
"url": "https://www.tangocrypto.com",
"payout_address": "addr_test1qpp33lzjgyzz6k86yy27kvkjepu8mfjy6g4l8rf2v8yjp4sla7h6txtvlevazp6jylz0w90y8yz0uec3cder28r47sssj9w2kd",
"policy": {
"lock": true,
"lock_time": "2022-02-24"
},
"metadata": {
"name": "<name>",
"asset_name": "<asset_name>",
"media_type": "<mime_type>",
"description": "<description>",
"files": [
{
"name": "<asset_name>",
"media_type": "<mime_type>",
"src": "<file_link>"
}
],
"attributes": {
"color": "<color>",
"body": "<body>",
"eyes": "<eyes>",
"face": "<face>",
"accessory": "<accessory>",
"collection": "Tangocrypto Collection",
"artist": "Tangocrypto",
"twitter": "https://twitter.com/tango_crypto",
"website": "https://www.tangocrypto.com",
"copyright": "Tangocrypto 2022"
},
"version": "1.0"
}
}
curl --location --request POST 'https://cardano-testnet.tangocrypto.com/<app-id>/v1/nft/collections' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Tango Collection",
"description": "Tango collection description",
"url": "https://www.tangocrypto.com",
"payout_address": "addr_test1qp9mj7vnenx4v99hw7ztfq03n7dmmujpgtlyfjhhel9w67nk72usllcew208n60ym94xcptfrgytuy5apwp565x28jgsg0ztq3",
"policy": {
"lock": true,
"lock_time": "2022-02-24"
},
"metadata": {
"asset_name": "<asset_name>",
"name": "<name>",
"media_type": "<mime_type>",
"description": "<description>",
"files": [
{
"name": "<asset_name>",
"media_type": "<mime_type>",
"src": "<file_link>"
}
],
"attributes": {
"color": "<color>",
"body": "<body>",
"eyes": "<eyes>",
"face": "<face>",
"accessory": "<accessory>",
"collection": "Tangocrypto Collection",
"artist": "Tangocrypto",
"twitter": "https://twitter.com/tango_crypto",
"copyright": "Tangocrypto 2021"
},
"version": "1.0"
}
}'
var axios = require('axios');
var data = JSON.stringify({
"name": "Tango Collection",
"description": "Tango collection description",
"url": "https://www.tangocrypto.com",
"payout_address": "addr_test1qpp33lzjgyzz6k86yy27kvkjepu8mfjy6g4l8rf2v8yjp4sla7h6txtvlevazp6jylz0w90y8yz0uec3cder28r47sssj9w2kd",
"policy": {
"lock": true,
"lock_time": "2022-02-24"
},
"metadata": {
"name": "<name>",
"asset_name": "<asset_name>",
"media_type": "<mime_type>",
"description": "<description>",
"files": [
{
"name": "<asset_name>",
"media_type": "<mime_type>",
"src": "<file_link>"
}
],
"attributes": {
"color": "<color>",
"body": "<body>",
"eyes": "<eyes>",
"face": "<face>",
"accessory": "<accessory>",
"collection": "Tangocrypto Collection",
"artist": "Tangocrypto",
"twitter": "https://twitter.com/tango_crypto",
"copyright": "Tangocrypto 2021"
},
"version": "1.0"
}
});
var config = {
method: 'post',
url: 'https://cardano-testnet.tangocrypto.com/<app-id>/v1/nft/collections',
headers: {
'x-api-key': '<your-api-key>',
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
This endpoint returns the
policy_id
. You should post the policy id
in your website, social media or any communication channel, you use for buyers to verify the authenticity of the tokens they buy.{
"id": "e1d7fe1d97c64518a5c51011edcc1a31",
"name": "Tango Collection",
"url": "https://www.tangocrypto.com",
"description": "Tango collection description",
"payout_address": "addr_test1qpp33lzjgyzz6k86yy27kvkjepu8mfjy6g4l8rf2v8yjp4sla7h6txtvlevazp6jylz0w90y8yz0uec3cder28r47sssj9w2kd",
"token_count": 0,
"token_for_sale_count": 0,
"token_sold_count": 0,
"revenue": 0,
"income": 0,
"service_fee": 0,
"nft_fee": 0,
"tx_fee": 0,
"total_fees": 0,
"policy": {
"lock": true,
"lock_time": "2022-02-24T00:00:00.000Z",
"policy_id": "6a16d7d312dfcbcb4f676fa31893cf6c456508d84472309f3aa7c998",
"script": {
"type": "all",
"scripts": [
{
"type": "sig",
"keyHash": "76bcc8cf947649636f027e705a30ec66fa0476971aef51d219323c07"
},
{
"type": "before",
"slot": 54094491
}
]
}
},
"metadata": {
"label": "721",
"asset_name": "<asset_name>",
"name": "<name>",
"media_type": "<mime_type>",
"description": "<description>",
"files": [
{
"name": "<asset_name>",
"media_type": "<mime_type>",
"src": "<file_link_1>"
}
],
"attributes": {
"color": "<color>",
"body": "<body>",
"eyes": "<eyes>",
"face": "<face>",
"accessory": "<accessory>",
"collection": "Tangocrypto Collection",
"artist": "Tangocrypto",
"twitter": "https://twitter.com/tango_crypto",
"website": "https://www.tangocrypto.com",
"copyright": "Tangocrypto 2022"
},
"version": "1.0"
},
"created_at": "2022-02-23T08:21:38.908Z",
"updated_at": "2022-02-23T08:21:38.908Z"
}
Last modified 11mo ago