NFT Collections

Create a new NFT Collection

POST https://api.nfty.dev/v1/collections

This endpoint creates a new Collection of NFTs. NFTYverse will upload and host all the metadata and optionally the images and media as well. If you prefer to host the metadata and media yourself, please see the "Self-Hosted" version below. This will deploy a new ERC721 or ERC1155 smart contract for the NFTs and can be thought of as a logical grouping for all your NFTs. Most apps will create a single Collection such as "My App NFTs", but you could also create multiple different collections, such as "App Badges", "App Coins", "App Cards", etc.

Headers

Name
Type
Description

Authorization

string

Your authorization token

Request Body

Name
Type
Description

mint_supply_count

integer

Maximum number of NFTs that can be minted in this collection. Use it to limit supply and creating scarcity. ONLY applies to ERC721 tokens and is ignored for ERC1155 tokens. Passing in 0 or omitting this means you can mint an infinite number of NFTs in this collection.

name

string

The name of this NFT Collection.

symbol

string

A symbol for this NFT Collection. Usually 3 or more capital letters.

description

string

Contract-level metadata as defined here: https://docs.opensea.io/docs/contract-level-metadata

image

string

Contract-level metadata as defined here: https://docs.opensea.io/docs/contract-level-metadata

external_link

string

Contract-level metadata as defined here: https://docs.opensea.io/docs/contract-level-metadata

seller_fee_basis_points

integer

Contract-level metadata as defined here: https://docs.opensea.io/docs/contract-level-metadata

fee_recipient

string

Contract-level metadata as defined here: https://docs.opensea.io/docs/contract-level-metadata

type

string

The type of NFT contract you want to create. Either ERC721 or ERC1155.

new_owner

String

Specify the address of an optional new owner for the smart contract for this Collection. This allows you to control and manage the smart contract outside of NFTYverse. Make sure you have full control of the owner if you decide to use this parameter.

{"request_id":"53e5079d941f14db8a24a8e8647e93071fdff93de9e424796010549fd3e573aa"}

Example Request:

curl --request POST \
     --url https://api.nfty.dev/v1/collections \
     --header 'Content-Type: application/json' \
     --header 'authorization: Bearer c4Vftx4kGiFYqpjM/3p4o5pgkmuthLWUNpXNlrig8EjlnSTeVgde4kEBdI1Uc1RFqWJBBRxkOmZ/QcHQXdQNjQ==' \
     --data '{
       "name": "Token Name",
  	   "symbol": "TKN",
       "description": "This is a description of my NFT collection.",
       "image": "https://domain.com/image.png",
       "external_link": "https://mywebsite.com",
       "mint_supply_count": 1000,
  	   "type": "ERC721"
       }'

Example Response:

{"request_id":"96c71219efed57b38068fc3fe3fcdbb9e4f41041f5d1fe8ea8b830dd3bd19586"}

Create a new NFT Collection (Self-Hosted)

POST https://api.nfty.dev/v1/collections

This endpoint creates a new "Self-Hosted" Collection of NFTs. "Self-Hosted" means that you will be hosting the metadata and images yourself and will pass in the URIs (base_uri and collection_uri) to the API. If you prefer that we host the metadata for you, please see above. This will deploy a new ERC721 or ERC1155 smart contract for the NFTs and can be thought of as a logical grouping for all your NFTs. Most apps will create a single Collection such as "My App NFTs", but you could also create multiple different collections, such as "App Badges", "App Coins", "App Cards", etc.

Headers

Name
Type
Description

Authorization

string

Your authorization token

Request Body

Name
Type
Description

mint_supply_account

integer

Maximum number of NFTs that can be minted in this collection. Use it to limit supply and creating scarcity. ONLY applies to ERC721 tokens and is ignored for ERC1155 tokens. Passing in 0 or omitting this means you can mint an infinite number of NFTs in this collection.

name

string

The name for this NFT Collection.

symbol

string

A symbol for this NFT Collection. Usually 3 or more capital letters.

base_uri

string

For ERC721 NFTs, this is the base URI for the token metadata. It is prepended to the token ID to generate each token's unique metadata URI. For ERC1155 NFTs, you should include the string {id} in the base_uri where you want the token ID to be inserted.

collection_uri

string

This is the URI to the metadata for this NFT Collection.

type

string

The type of NFT contract you want to create. Either ERC721 or ERC1155.

new_owner

String

Specify the address of an optional new owner for the smart contract for this Collection. This allows you to control and manage the smart contract outside of NFTYverse. Make sure you have full control of the owner if you decide to use this parameter.

{"request_id":"53e5079d941f14db8a24a8e8647e93071fdff93de9e424796010549fd3e573aa"}

Example Request:

curl --request POST \
     --url https://api.nfty.dev/v1/collections \
     --header 'Content-Type: application/json' \
     --header 'authorization: Bearer c4Vftx4kGiFYqpjM/3p4o5pgkmuthLWUNpXNlrig8EjlnSTeVgde4kEBdI1Uc1RFqWJBBRxkOmZ/QcHQXdQNjQ==' \
     --data '{
       "name": "Token Name",
  	   "symbol": "TKN",
       "base_uri": "https://base.com/",
       "collection_uri": "https://contract.com/721",
  	   "type": "ERC721"
       }'

Example Response:

{"request_id":"96c71219efed57b38068fc3fe3fcdbb9e4f41041f5d1fe8ea8b830dd3bd19586"}

View your NFT Collections

GET https://api.nfty.dev/v1/collections

This endpoint allows you to see all of your successfully created Collections. If you recently created a Collection and it is not listed yet, then the blockchain transaction may still be pending.

Headers

Name
Type
Description

Authorization

string

Your authorization token

[
  {
    "address":"0xb9bf61b55f66afc64fd7fbf7fa4fea4e2e4c5fdd",
    "name":"ERC721 Token",
    "symbol":"TKN",
    "base_uri":"https://base.com/",
    "collection_uri":"https://contract.com/721",
    "type":"ERC721",
    "timestamp":"2021-08-30T07:34:17.516Z"
  },
  {
    "address":"0xcbec1a2ae881487fa642041cbd1bfe4b690af269",
    "name":"ERC1155 Tokens",
    "symbol":"TKNS",
    "base_uri":"https://base.com/{id}",
    "collection_uri":"https://contract.com/1155",
    "type":"ERC1155",
    "timestamp":"2021-08-30T07:35:26.151Z"
  }
]

Example Request:

curl --request GET \
     --url https://api.nfty.dev/v1/collections \
     --header 'Content-Type: application/json' \
     --header 'authorization: Bearer c4Vftx4kGiFYqpjM/3p4o5pgkmuthLWUNpXNlrig8EjlnSTeVgde4kEBdI1Uc1RFqWJBBRxkOmZ/QcHQXdQNjQ=='

Example Response:

[
  {
    "address":"0xb9bf61b55f66afc64fd7fbf7fa4fea4e2e4c5fdd",
    "name":"ERC721 Token",
    "symbol":"TKN",
    "base_uri":"https://base.com/",
    "collection_uri":"https://contract.com/721",
    "mint_supply_count":1000, 
    "type":"ERC721",
    "timestamp":"2021-08-30T07:34:17.516Z"
  },
  {
    "address":"0xcbec1a2ae881487fa642041cbd1bfe4b690af269",
    "name":"ERC1155 Tokens",
    "symbol":"TKNS",
    "base_uri":"https://base.com/{id}",
    "collection_uri":"https://contract.com/1155",
    "mint_supply_count":0,
    "type":"ERC1155",
    "timestamp":"2021-08-30T07:35:26.151Z"
  }
]

List NFTs in a Collection

GET https://api.nfty.dev/v1/collections/:address

This endpoint returns the NFT items currently in this NFT Collection. The address must be associated with a Collection that you created.

Path Parameters

Name
Type
Description

address*

string

Address of this Collection

Query Parameters

Name
Type
Description

limit

integer

How many results to return. The maximum is 30.

offset

integer

The offset of the returned results. So you can paginate.

Headers

Name
Type
Description

Authorization*

string

Your authentication token

Example Request:

curl --request GET \
     --url https://api.nfty.dev/v1/collections/0xb9bf61b55f66afc64fd7fbf7fa4fea4e2e4c5fdd \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer c4Vftx4kGiFYqpjM/3p4o5pgkmuthLWUNpXNlrig8EjlnSTeVgde4kEBdI1Uc1RFqWJBBRxkOmZ/QcHQXdQNjQ=='

Example Response:

{
"address":"0xb9bf61b55f66afc64fd7fbf7fa4fea4e2e4c5fdd",
"assets":
 [
  {"token_id":1,"token_url":"https://nfty.com/1","timestamp":"2021-08-30T07:35:26.151Z"},
  {"token_id":2,"token_url":"https://nfty.com/2","timestamp":"2021-08-30T07:35:26.151Z"},
  {"token_id":3,"token_url":"https://nfty.com/3","timestamp":"2021-08-30T07:35:26.151Z"}
 ]
}

Last updated