---
title: "Deploy contract"
method: POST
path: "/tokenization/templates/{contractTemplateId}/deploy"
tags: ["Contract Templates"]
---

# Deploy contract

`POST /tokenization/templates/{contractTemplateId}/deploy`

## Request

- Base URL: `https://api.fireblocks.io/v1`
- URL: `https://api.fireblocks.io/v1/tokenization/templates/{contractTemplateId}/deploy`
- Auth: none declared
- TypeScript: <https://skmtc.dev/fireblocks/apis/fireblocks-api/docs/tokenization/templates/:contractTemplateId/deploy/post.ts> (a function with typed inputs; its response is checked against the schema)

Deploy a new contract by contract template id. If you wish to deploy a token (ERC20, ERC721 etc), and create asset please use POST /tokenization

## Path parameters

- `contractTemplateId` string, required

## Headers

- `Idempotency-Key` string

## Request body

- ContractDeployRequest
  - `assetId` string, required: The base asset identifier of the blockchain you want to deploy to
  - `vaultAccountId` string, required: The vault account id you wish to deploy from
  - `constructorParameters` ParameterWithValue[]: The constructor parameters of this contract
    - `name` string, required: The name of the parameter as it appears in the ABI
    - `description` string: A description of the parameter, fetched from the devdoc of this contract
    - `internalType` string: The internal type of the parameter as it appears in the ABI
    - `type` string, required: The type of the parameter as it appears in the ABI
    - `components` Parameter[]
      - `name` string, required: The name of the parameter as it appears in the ABI
      - `description` string: A description of the parameter, fetched from the devdoc of this contract
      - `internalType` string: The internal type of the parameter as it appears in the ABI
      - `type` string, required: The type of the parameter as it appears in the ABI
      - `components` Parameter[]
    - `value` string: The value of the parameter. The shape follows the ABI `type`: a string for `string`/`address`/`bytes*`, a number for `uint*`/`int*`, a boolean for `bool`, an array for `T[]`, and for `tuple` an array of nested ParameterWithValue objects (one per entry in `components`, in ABI order).
    - `functionValue` LeanAbiFunction
      - `name` string: The function name
      - `inputs` ParameterWithValue[], required: The function inputs
      - `outputs` ParameterWithValue[]: The function outputs
      - `stateMutability` 'view' | 'pure' | 'nonpayable' | 'payable': The state mutability of the function (e.g., view, pure, nonpayable, payable)
  - `useGasless` boolean: Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay.
  - `fee` string: Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field
  - `feeLevel` 'LOW' | 'MEDIUM' | 'HIGH': Fee level for the write function transaction. interchangeable with the 'fee' field

## Response `202`

Contract was deployed successfully

- ContractDeployResponse
  - `txId` string, required: The transaction id of the deployment request

## Other responses

- `404`: Could not find contract.
- `default`: Error Response

---

[API](https://skmtc.dev/fireblocks/apis/fireblocks-api.md) - [All operations](https://skmtc.dev/fireblocks/apis/fireblocks-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fireblocks/apis/fireblocks-api/revisions/4eba9965659a?raw)
