Minting New Traits

Minting Traits is a highly privileged process that enables collection admin or authorized users to add new traits to NFTs.

To perform a minting operation, the Integrator must send a POST request to the following endpoint:

POST /v1/account/get-token

The request body should contain the following parameters:

  • collection_id: the unique identifier of the collection

  • token_id: the on-chain token ID to which the traits will be assigned

  • traits: a list of trait objects that will be added to the token

The traits should be submitted in the following format:

{ "trait_type": "trait type name", "value": "trait value" }

Here's an example payload of the request body for adding two traits:

{
  "collection_id": "abc123",
  "token_id": "12345",
  "traits": [
    { "trait_type": "trait type name", "value": "trait value" },
    { "trait_type": "another trait type name", "value": "another trait value" }
  ]
}

Only the value and trait_type fields are required in the payload. The renderOrder and imageUrl fields are not needed.

Make sure the traits posted in the traits collection match the trait metadata provided during the creation of the collection.

For example, if the metadata includes a trait object in the following format:

{
  "value": "Background 01",
  "trait_type": "Background",
  "render_order": "1",
  "image_url": "https://arweave.net/4bvRkfaClkLosqJsXylLeE1n2oabIg5k2gKVc6xLInQ"
}

Then, the trait_type and value fields sent in the POST request should match the above trait object as shown below:

{
  "value": "Background 01",
  "trait_type": "Background"
}

Upon successful completion of the request, the token's traits will be updated, and the metadata associated with the token will reflect the new changes on-chain. You can then query the metadata using our API.

Minting traits is a privileged operation and should only be performed by collection admins who have been granted the necessary permissions.

Last updated