Skip to main content

Deploy Currency Token

Retries a currency token's contract deploy. Create Currency Token already deploys the token, so this is not a second step of creation: it exists for a token whose deploy failed. It signs with the wallet frozen onto the token at creation, on the token's network.

The call is asynchronous: it records a DeployCurrencyToken (type 1) transaction, publishes it and returns its ID. Poll Get Currency Token Transactions by ID until that transaction reaches status 3 (Done) or 4 (Error).

The retry is refused when:

  • the token's last deploy transaction is still running (status 1, 2 or 5): 10007;
  • the token's last deploy transaction is Done: 10003, the token is already deployed;
  • the token's status is not 1 (Draft) or 4 (Error): 10003.

The token's node must be the platform root node and inside your API key's node subtree.

Required permission: currency-token:deploy

Request​

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

Parameters​

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

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>

Example​

curl --request POST \
--url '{{baseUrl}}/v2/admin/currency-tokens/68fe8c129367fd414b227c7a/deploy' \
--header 'Authorization: Bearer <access_token>'

Response​

{
"transaction_id": "6a8b5e13f9129816a6cc7a12"
}

Response Fields​

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

Errors​

StatusCodeDescription
40010015Validation failed — see details
40410001 (domain 15)Currency token not found
40010007 (domain 15)A deploy of this token is already in progress
40010003 (domain 15)The token is already deployed, or its status is not Draft or Error
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.