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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://developers.fireblocks.com/feedback

```json
{
  "path": "/api-reference/contract-templates/deploy-contract",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Deploy contract

> 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



## OpenAPI

````yaml https://docs.fireblocks.com/api/v1/swagger.yaml post /tokenization/templates/{contractTemplateId}/deploy
openapi: 3.0.0
info:
  title: Fireblocks API
  description: >
    Fireblocks provides a suite of applications to manage digital asset
    operations and a complete development platform to build your business on the
    blockchain.


    - Visit our website for more information: [Fireblocks
    Website](https://fireblocks.com)

    - Visit our developer docs: [Fireblocks
    DevPortal](https://developers.fireblocks.com)
  version: 1.6.2
  contact:
    email: developers@fireblocks.com
servers:
  - url: https://api.fireblocks.io/v1
    description: Fireblocks Production Environment Base URL
  - url: https://sandbox-api.fireblocks.io/v1
    description: Fireblocks Sandbox Environment Base URL
security: []
paths:
  /tokenization/templates/{contractTemplateId}/deploy:
    post:
      tags:
        - Contract Templates
      summary: Deploy contract
      description: >-
        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
      operationId: deployContract
      parameters:
        - name: contractTemplateId
          required: true
          in: path
          description: The Contract Template identifier
          example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d
          schema:
            type: string
        - $ref: '#/components/parameters/X-Idempotency-Key'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractDeployRequest'
      responses:
        '202':
          description: Contract was deployed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDeployResponse'
        '404':
          description: Could not find contract.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpContractDoesNotExistError'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response: Promise<FireblocksResponse<ContractDeployResponse>>
            =
            fireblocks.contractTemplates.deployContract(contractTemplatesApiDeployContractRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<ContractDeployResponse>> response =
            fireblocks.contractTemplates().deployContract(contractDeployRequest,
            contractTemplateId, idempotencyKey);
        - lang: Python
          source: >-
            response =
            fireblocks.contract_templates.deploy_contract(contract_deploy_request,
            contract_template_id, idempotency_key);
components:
  parameters:
    X-Idempotency-Key:
      name: Idempotency-Key
      in: header
      description: >-
        A unique identifier for the request. If the request is sent multiple
        times with the same idempotency key, the server will return the same
        response as the first request. The idempotency key is valid for 24
        hours.
      required: false
      schema:
        type: string
  schemas:
    ContractDeployRequest:
      type: object
      properties:
        assetId:
          type: string
          example: ETH_TEST5
          description: The base asset identifier of the blockchain you want to deploy to
        vaultAccountId:
          type: string
          example: '0'
          description: The vault account id you wish to deploy from
        constructorParameters:
          description: The constructor parameters of this contract
          items:
            $ref: '#/components/schemas/ParameterWithValue'
          example:
            - internalType: string
              name: name_
              type: string
              value: TokenName
            - internalType: string
              name: symbol_
              type: string
              value: TokenSymbol
          type: array
        useGasless:
          type: boolean
          example: false
          description: >-
            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:
          type: string
          description: >-
            Max fee amount for the write function transaction. interchangeable
            with the 'feeLevel' field
          example: '2000'
        feeLevel:
          enum:
            - LOW
            - MEDIUM
            - HIGH
          type: string
          description: >-
            Fee level for the write function transaction. interchangeable with
            the 'fee' field
          example: MEDIUM
      required:
        - assetId
        - vaultAccountId
    ContractDeployResponse:
      type: object
      properties:
        txId:
          type: string
          example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d
          description: The transaction id of the deployment request
      required:
        - txId
    HttpContractDoesNotExistError:
      type: object
      properties:
        message:
          type: string
          description: Not Found error code
          example: Contract does not exist
        code:
          type: string
          description: Error code
          example: 404
    ParameterWithValue:
      type: object
      properties:
        name:
          type: string
          example: _name
          description: The name of the parameter as it appears in the ABI
        description:
          type: string
          example: The name of the token
          description: >-
            A description of the parameter, fetched from the devdoc of this
            contract
        internalType:
          type: string
          example: string
          description: The  internal type of the parameter as it appears in the ABI
        type:
          type: string
          example: string
          description: The type of the parameter as it appears in the ABI
        components:
          type: array
          items:
            $ref: '#/components/schemas/Parameter'
        value:
          example: 'true'
          description: The value of the parameter. can also be ParameterWithValue
          type: string
        functionValue:
          description: >-
            The function value of this param (if has one). If this is set, the
            `value` shouldn`t be. Used for proxies
          allOf:
            - $ref: '#/components/schemas/LeanAbiFunction'
      required:
        - name
        - type
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
    Parameter:
      type: object
      properties:
        name:
          type: string
          example: _name
          description: The name of the parameter as it appears in the ABI
        description:
          type: string
          example: The name of the token
          description: >-
            A description of the parameter, fetched from the devdoc of this
            contract
        internalType:
          type: string
          example: string
          description: The internal type of the parameter as it appears in the ABI
        type:
          type: string
          example: string
          description: The type of the parameter as it appears in the ABI
        components:
          type: array
          items:
            $ref: '#/components/schemas/Parameter'
      required:
        - name
        - type
    LeanAbiFunction:
      type: object
      properties:
        name:
          type: string
          example: initialize
          description: The function name
        inputs:
          description: The function inputs
          type: array
          items:
            $ref: '#/components/schemas/ParameterWithValue'
        outputs:
          description: The function outputs
          type: array
          items:
            $ref: '#/components/schemas/ParameterWithValue'
        stateMutability:
          type: string
          enum:
            - view
            - pure
            - nonpayable
            - payable
          example: nonpayable
          description: >-
            The state mutability of the function (e.g., view, pure, nonpayable,
            payable)
      required:
        - inputs
  responses:
    Error:
      description: Error Response
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSchema'
  headers:
    X-Request-ID:
      schema:
        type: string
      description: >-
        Unique ID correlated to the API request. Please provide it in any
        support ticket you create or on Github issues related to Fireblocks SDKs

````