POST
/
contracts
/
{contractId}
/
token-types
curl --request POST \
  --url https://protocol-sandbox.lumx.io/v2/contracts/{contractId}/token-types \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "maxSupply": 123,
  "traits": {},
  "imageUrl": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "uriNumber": 123,
  "contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "maxSupply": 123,
  "currentSupply": 123,
  "traits": {
    "trait1_name": "<string>",
    "trait2_name": "<string>",
    "trait3_name": "<string>"
  },
  "imageUrl": "<string>",
  "metadataUrl": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <API_KEY>.

Path Parameters

contractId
string
required

The ID of the contract.

Body

application/json
name
string
required

The name of the token type. Two token types belonging to a same contract cannot have the same name.

description
string
required

The description of the token type.

maxSupply
number
required

The max supply of the token type.

traits
object

The traits of the token type. The key is the name of the trait and the value is the value of the trait.

imageUrl
string

The image URL of the token type. Supported formats are PNG, JPEG, GIF or MP4.

Response

201 - application/json
id
string

The ID of the token type.

uriNumber
number

The URI number of the token.

contractId
string

The ID of the contract.

name
string

The name of the token type.

description
string | null

The description of the token type.

maxSupply
number

The max supply of the token type.

currentSupply
number

The current supply for this token type.

traits
object

The traits of the token type. The key is the name of the trait and the value is the value of the trait.

imageUrl
string | null

The image URL of the token type. Supported formats are PNG, JPEG, GIF or MP4.

metadataUrl
string

The URL where this token types's metadata JSON is located.

createdAt
string

The timestamp from when the token type was created.

updatedAt
string

The timestamp from when the token type was last updated.