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,2or5):10007; - the token's last deploy transaction is Done:
10003, the token is already deployed; - the token's status is not
1(Draft) or4(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
| Name | Type | In | Description |
|---|---|---|---|
currency_token_id | string | path | Required. Currency token ID (24-character hex) |
Headers
| Name | Description |
|---|---|
Authorization | Required. 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
| Field | Type | Description |
|---|---|---|
transaction_id | string | The currency token transaction this call started. A 200 means the deploy was queued, not that it finished |
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10015 | Validation failed — see details |
| 404 | 10001 (domain 15) | Currency token not found |
| 400 | 10007 (domain 15) | A deploy of this token is already in progress |
| 400 | 10003 (domain 15) | The token is already deployed, or its status is not Draft or Error |
| 400 | 10001 (domain 2) | The token's node was not found |
| 403 | 10005 (domain 2) | The token's node is not the platform root node, or is outside your API key's node subtree |
| 500 | 10000 | Unexpected server error, including a currency_token_id that is not a 24-character hex ID |
See Errors for the error format and common codes.