Update Token-type Metadata

Endpoint that allows you to update the metadata of a NFT template (Token type).

🚧

Note: This endpoint allows you to update the metadata, some attributes are defined on the NFT contract and therefore not updatable.

Here is a list of the attributes that can not be updated:

  • fungible
  • burnable
  • maxSupply

Request Endpoint: reference

PUT /api/v2/contracts/{secretType}/{contractAddress}/token-types/{tokenTypeId}/metadata
ParameterParam TypeDescriptionData TypeMandatory
{secretType}PathThe blockchain of the contract.String
{contractAddress}PathThe contract address.String
{tokenTypeId}PathThe id of the token-type whose metadata you want to update.Integer

Example Request:

PUT /api/v2/contracts/MATIC/0x30d6cff9cb268c59c75a94755b2c60e118d65657/token-types/1/metadata
{
  "name": "Token-type name updated",
  "description": "Description Updated",
  "image": "www.image-url-updated.com.png"
}

Response Body:

{
    "success": true,
    "result": {
        "name": "Token-type name updated",
        "description": "Description Updated",
        "image": "www.image-url-updated.com.png",
        "imagePreview": "www.image-url-updated.com.png",
        "imageThumbnail": "www.image-url-updated.com.png",
        "animationUrls": [],
        "attributes": [
            {
                "type": "system",
                "name": "tokenTypeId",
                "value": "1",
                "traitType": "Token Type ID",
                "trait_type": "Token Type ID"
            }
        ],
        "contract": {
            "address": "0x30d6cff9cb268c59c75a94755b2c60e118d65657",
            "name": "My first collection",
            "symbol": "MYFICO",
            "image": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
            "imageUrl": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
            "image_url": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
            "description": "Sample description",
            "externalLink": "www.venly.io",
            "external_link": "www.venly.io",
            "externalUrl": "www.venly.io",
            "external_url": "www.venly.io",
            "media": [],
            "type": "ERC_1155"
        },
        "fungible": false
    }
}

What’s Next

For more information on configuration options in the NFT template, such as adding media, defining a max supply, and much more please read NFT Configuration.