Skip to main content

POST /v1/tokens/{tokenId}/deploy

Deploy a token configuration to Quantum Chain. The endpoint creates a TokenOperation of type DEPLOY_TOKEN, attaches it to a Qustody transaction, evaluates the approval policy, requests a post-quantum signature, broadcasts, and tracks confirmations.
AspectDetail
MethodPOST
Path/v1/tokens/{tokenId}/deploy
AuthenticationBearer API key
Required permissionstokens:deploy
IdempotencyIdempotency-Key header required
Approval policyRequired — deployment is privileged
Blockchain effectContract creation transaction
Webhook eventstoken.deployment_requested, token.deployed, token.deployment_failed, plus the underlying transaction.* events

Request body

{
  "deployerWalletId": "wallet_xyz789",
  "constructorArgs": {
    "name": "Example Institutional Token",
    "symbol": "EIT",
    "decimals": 18,
    "initialSupply": "0"
  },
  "feeStrategy": "MEDIUM",
  "idempotencyKey": "deploy-eit-2026-04-27"
}

Response (202)

{
  "tokenId": "token_abc123",
  "operationId": "op_deploy_789",
  "operationType": "DEPLOY_TOKEN",
  "status": "PENDING_AUTHORIZATION",
  "transactionRequestId": "txreq_001",
  "approvalPolicyId": "policy_456",
  "createdAt": "2026-04-27T10:01:00Z"
}
The transactionRequestId references the underlying Qustody transaction. Status follows the existing transaction state machine: PENDING_AUTHORIZATION → APPROVED → PENDING_SIGNATURE → SIGNED → BROADCASTING → CONFIRMING → COMPLETED (or REJECTED / FAILED).

GET /v1/tokens/{tokenId}/deployment

Fetch the latest deployment record, including the on-chain contractAddress once the deployment is COMPLETED.
{
  "tokenId": "token_abc123",
  "operationId": "op_deploy_789",
  "status": "COMPLETED",
  "transactionHash": "0x4ab1…",
  "contractAddress": "0x9a8e5e21…",
  "blockNumber": 1860612,
  "deployedAt": "2026-04-27T10:03:42Z"
}

Errors

CodeTypeMeaning
1702TOKEN_ALREADY_DEPLOYEDToken already has a confirmed contractAddress.
1707TOKEN_DEPLOYMENT_FAILEDDeployment reverted on chain; see failureReason.
1200POLICY_DENIEDApproval policy denied the operation.
1201APPROVAL_REQUIREDApproval is required and was not yet granted.
1601IDEMPOTENCY_CONFLICTSame Idempotency-Key reused with different body.
1303TX_BROADCAST_FAILEDUnderlying transaction could not be broadcast.

Retry safety

Retries with the same Idempotency-Key are safe and return the original operation. Retries with a different key may create a duplicate deployment — do not vary the key on retry.