> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quantumapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy token

> Create a deployment transaction, route it through approval and post-quantum signing, broadcast, and track.

## `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](/concepts/policies), requests a [post-quantum signature](/concepts/quantum-safety), 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

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

### Response (202)

```json theme={null}
{
  "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](/concepts/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`.

```json theme={null}
{
  "tokenId": "token_abc123",
  "operationId": "op_deploy_789",
  "status": "COMPLETED",
  "transactionHash": "0x4ab1…",
  "contractAddress": "0x9a8e5e21…",
  "blockNumber": 1860612,
  "deployedAt": "2026-04-27T10:03:42Z"
}
```

### 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 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.

## Related

* [Token operations](/api-reference/tokens/list-token-operations)
* [Lifecycle](/qustody/token-management/token-operation-lifecycle)
* [Token webhooks](/qustody/token-management/token-webhooks)
* [Guide — Create a QRC-20 token](/guides/create-a-qrc-20-token)
