Skip to main content
POST
/
tokens
/
mint
Mint Token
curl --request POST \
  --url https://api.g2cplatform.com/v2/tokens/mint \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "type": "fungible",
  "receiverWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "symbol": "<string>",
  "amount": 1,
  "nftMetadata": {
    "name": "<string>",
    "description": "<string>",
    "image": "<string>",
    "attributes": [
      {
        "trait_type": "<string>",
        "value": "<string>"
      }
    ],
    "external_url": "<string>"
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "mint",
  "tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "timestamp": "2023-11-07T05:31:56Z",
  "tokenType": "fungible",
  "symbol": "<string>",
  "amount": 123,
  "fromWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "toWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "memo": "<string>",
  "status": "pending",
  "blockchain": {
    "txId": "<string>",
    "confirmations": 123,
    "fee": 123
  }
}

Authorizations

X-API-Key
string
header
required

API key for authenticating requests. Include in X-API-Key header.

Body

application/json
type
enum<string>
required

Type of token to mint

Available options:
fungible,
nft
receiverWalletId
string<uuid>
required

ID of the wallet to receive the minted tokens

symbol
string

Symbol for fungible tokens (required when type is 'fungible')

Required string length: 1 - 10
amount
number<double>

Amount to mint for fungible tokens (required when type is 'fungible')

Required range: x >= 0
nftMetadata
object

Metadata for NFT tokens (required when type is 'nft')

Response

Token minted successfully

id
string<uuid>
required

Unique identifier for the transaction

type
enum<string>
required

Type of transaction

Available options:
mint,
transfer,
receive
tokenId
string<uuid>
required

ID of the token involved in the transaction

timestamp
string<date-time>
required

When the transaction occurred

tokenType
enum<string>

Type of token

Available options:
fungible,
nft
symbol
string

Symbol for fungible tokens

amount
number<double>

Amount transferred (for fungible tokens)

fromWalletId
string<uuid>

ID of the sender wallet (null for mint transactions)

toWalletId
string<uuid>

ID of the recipient wallet

memo
string

Optional memo or description for the transaction

status
enum<string>

Current status of the transaction

Available options:
pending,
completed,
failed
blockchain
object