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.
| Aspect | Detail |
|---|---|
| Method | POST |
| Path | /v1/tokens/{tokenId}/deploy |
| Authentication | Bearer API key |
| Required permissions | tokens:deploy |
| Idempotency | Idempotency-Key header required |
| Approval policy | Required — deployment is privileged |
| Blockchain effect | Contract creation transaction |
| Webhook events | token.deployment_requested, token.deployed, token.deployment_failed, plus the underlying transaction.* events |
Request body
Response (202)
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.
Errors
| Code | Type | Meaning |
|---|---|---|
| 1702 | TOKEN_ALREADY_DEPLOYED | Token already has a confirmed contractAddress. |
| 1707 | TOKEN_DEPLOYMENT_FAILED | Deployment reverted on chain; see failureReason. |
| 1200 | POLICY_DENIED | Approval policy denied the operation. |
| 1201 | APPROVAL_REQUIRED | Approval is required and was not yet granted. |
| 1601 | IDEMPOTENCY_CONFLICT | Same Idempotency-Key reused with different body. |
| 1303 | TX_BROADCAST_FAILED | Underlying transaction could not be broadcast. |
Retry safety
Retries with the sameIdempotency-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.