---
title: "Link a contract"
method: POST
path: "/tokenization/tokens/link"
tags: ["Tokenization"]
---

# Link a contract

`POST /tokenization/tokens/link`

## Request

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

Link an a contract

## Headers

- `Idempotency-Key` string

## Request body

- TokenLinkRequestDto
  - `type` 'FUNGIBLE_TOKEN' | 'NON_FUNGIBLE_TOKEN' | 'TOKEN_UTILITY' | 'TOKEN_EXTENSION', required: The type of token being linked
  - `refId` string: The Fireblocks' token link reference id. For example, 'BQ5R_BDESC_ABC' if it's a fungible asset
  - `displayName` string: The token display name
  - `baseAssetId` string: The blockchain base assetId
  - `contractAddress` string: The contract's onchain address

## Response `200`

Token linked successfully

- TokenLinkDto
  - `id` string, required: The token link id
  - `status` 'PENDING' | 'COMPLETED', required: The token status
  - `type` 'FUNGIBLE_TOKEN' | 'NON_FUNGIBLE_TOKEN' | 'TOKEN_UTILITY' | 'TOKEN_EXTENSION': The type of token
  - `refId` string: The Fireblocks' reference id
  - `displayName` string: The token display name. If was not provided, would be taken from the contract template
  - `tokenMetadata` union: The token's metadata
    - AssetMetadataDto
      - `assetId` string, required: The Fireblocks` asset id
      - `name` string: The name of the token
      - `symbol` string: The symbol of the token
      - `networkProtocol` string: The network protocol of the token
      - `totalSupply` string: The total supply of the token
      - `holdersCount` number: The number of holders of the token
      - `type` string: The type of the token
      - `contractAddress` string: The address of the token contract
      - `issuerAddress` string: In case of Stellar or Ripple, the address of the issuer of the token
      - `testnet` boolean: Is it deployed on testnet or to mainnet
      - `blockchain` string: The blockchain native asset id which the token is deployed on
      - `decimals` number: The number of decimals of the token
      - `vaultAccountId` string: The id of the vault account that initiated the request to issue the token. Will be empty if token was issued outside of Fireblocks.
    - CollectionMetadataDto
      - `fbCollectionId` string, required: Fireblocks collection id
      - `name` string: Collection name
      - `symbol` string: Collection symbol
      - `standard` string: Collection contract standard
      - `blockchainDescriptor` string, required: Collection's blockchain
      - `contractAddress` string: Collection contract address
    - ContractMetadataDto
      - `id` string, required: The deployed contract ID
      - `blockchainId` string, required: The blockchain ID
      - `contractAddress` string, required: The address of the token contract
      - `contractTemplateId` string, required: The contract template ID
      - `vaultAccountId` string: The vault account ID that initiated the request to issue the token

## Other responses

- `201`
- `404`: Could not find the underlying contract to link to
- `409`: Token link for {refId} already exists
- `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)
