Skip to main content

Mint Currency Token by ID

Mints new units of a currency token. The token must be in status 3 (Active), so its deploy has confirmed. The mint is signed by the wallet frozen onto the token at creation, on the token's network. The token's node must be the platform root node and inside your API key's node subtree.

amount is a whole number of tokens as a decimal string ("2000"): the token contract mints whole tokens and applies the decimals itself. A fractional amount such as "12.5" is refused, never rounded. See Amounts and Percentages.

The call is asynchronous: it records a MintCurrencyToken (type 2) transaction, publishes it and returns its ID. The supply only grows once that transaction settles. Poll Get Currency Token Transactions by ID until it reaches status 3 (Done) or 4 (Error).

Required permission: currency-token:mint

Request​

POST /v2/admin/currency-tokens/{currency_token_id}/mint

Parameters​

NameTypeInDescription
currency_token_idstringpathRequired. Currency token ID (24-character hex)

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>
Content-TypeRequired. application/json

Body​

FieldTypeRequiredDescription
amountstringYesNumber of whole tokens to mint, greater than zero, no decimals (for example "2000")

Example​

curl --request POST \
--url '{{baseUrl}}/v2/admin/currency-tokens/6a859ae35a7db4268dfb40d2/mint' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": "2000"
}'

Response​

{
"transaction_id": "6a8b5e13f9129816a6cc7a12"
}

Response Fields​

FieldTypeDescription
transaction_idstringThe currency token transaction this call started. A 200 means the mint was queued, not that it finished

Errors​

StatusCodeDescription
40010015Validation failed — see details. Includes a missing, zero, malformed or fractional amount
40410001 (domain 15)Currency token not found
40010005 (domain 15)The token is not Active: its deploy has not confirmed
40010001 (domain 2)The token's node was not found
40310005 (domain 2)The token's node is not the platform root node, or is outside your API key's node subtree
50010000Unexpected server error, including a currency_token_id that is not a 24-character hex ID

See Errors for the error format and common codes.