# Prepare An FA1.2 Token Transfer From Address Tezos

Prepare an unsigned FA1.2 token transfer from an address. Builds the token contract transfer entrypoint call and returns the forged unsigned operation bytes (ready for the signer) together with the branch, counter, fee, gas and storage limits. When the source account is unrevealed and a public key is supplied, a reveal operation is prepended.

- **Endpoint:** `POST https://rest.cryptoapis.io/prepare-transactions/tezos/{network}/fa1-2-tokens`
- **Authentication:** `x-api-key` header
- **Credits cost:** 104 credits for 1 result by default; per blockchain: Tezos: 104
- **Documentation page:** https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/prepare-transactions-tezos/prepare-an-fa12-token-transfer-from-address-tezos/post

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `network` | string | yes | Represents the name of the blockchain network used; "mainnet" is the live network with actual data while the others are test networks. Allowed values: `mainnet`, `shadownet`. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `context` | string | no | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. |

## Request body (application/json)

```json
{
  "context": "yourExampleString",
  "data": {
    "item": {
      "fromAddress": "tz1YWK1gDPQx9N1Jh4JnmVre7xN6xhGGM4FN",
      "toAddress": "tz1burnburnburnburnburnburnburjAYjjX",
      "contractAddress": "KT1PWx2mnDueood7fEmfbBDKx1D9BAnnXitn",
      "amount": "1000000",
      "tokenStandard": "FA_1_2",
      "fromPublicKey": "edpkuBknW28nMH1eeUysTaXmQBHfa9WgTUxs95E7XLPTHK83MMkWnq",
      "feeOptions": {
        "priority": "standard"
      }
    }
  }
}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `context` | string | no | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. |
| `data` | object | yes |  |
| `data.item` | object | yes |  |
| `data.item.fromAddress` | string | yes | Sender's Tezos address (tz1/tz2/tz3). The token holder. |
| `data.item.toAddress` | string | yes | Recipient's Tezos address. |
| `data.item.contractAddress` | string | yes | The FA1.2 token contract address (KT1). |
| `data.item.amount` | string | yes | Token amount to send (in the token's base units), as an integer string. |
| `data.item.tokenStandard` | string | no | The token standard - FA_1_2 for this endpoint. |
| `data.item.fromPublicKey` | string | no | Sender's public key. Required only when the source account is unrevealed. |
| `data.item.feeOptions` | object | no | Fee configuration. |
| `data.item.feeOptions.priority` | string | no | Fee priority - slow, standard or fast. Selects the priority fee tier. |

## Responses

| Status | Description |
| --- | --- |
| 201 | The resource has been successfully submitted. |
| 400 | 400 |
| 401 | 401 |
| 402 | 402 |
| 403 | 403 |
| 409 | The data provided seems to be invalid. |
| 415 | The selected Media Type is unavailable. The Content-Type header should be 'application/json'. |
| 422 | Your request body for POST requests must have a structure of { data: { item: [...properties] } } |
| 429 | The request limit has been reached. There can be maximum {requests} requests per {seconds} second(s) made. Please contact our team via email if you need more or upgrade your plan. |
| 500 | An unexpected server error has occurred, we are working to fix this. Please try again later and in case it occurs again please report it to our team via email. |

### Example 201 response

```json
{
  "apiVersion": "2024-12-12",
  "requestId": "601c1710034ed6d407996b30",
  "context": "yourExampleString",
  "data": {
    "item": {
      "source": "tz1YWK1gDPQx9N1Jh4JnmVre7xN6xhGGM4FN",
      "destination": "tz1burnburnburnburnburnburnburjAYjjX",
      "amount": "1000000",
      "branch": "BLc1BjrQ7ByvHW1p4A5B3nX1nB5Y7pT2xY3zB9fD1hK6mN8pQr",
      "counter": "12345678",
      "fee": {
        "amount": "5000",
        "unit": "mutez"
      },
      "gasLimit": "4521",
      "storageLimit": "350",
      "forgedOperation": "e655b1a97c6b3e6e0b7b02d7e2e3f4a5b6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90",
      "revealRequired": false,
      "contract": "KT1PWx2mnDueood7fEmfbBDKx1D9BAnnXitn"
    }
  }
}
```

### 201 response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `apiVersion` | string | yes | Specifies the version of the API that incorporates this endpoint. |
| `requestId` | string | yes | Defines the ID of the request. The `requestId` is generated by Crypto APIs and it's unique for every request. |
| `context` | string | no | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. |
| `data` | object | yes |  |
| `data.item` | object | yes |  |
| `data.item.source` | string | yes | The source (sender / token holder) address. |
| `data.item.destination` | string | yes | The recipient address. |
| `data.item.amount` | string | yes | The token amount transferred. |
| `data.item.branch` | string | yes | The head block hash the operation is anchored to. |
| `data.item.counter` | string | yes | The source account's operation counter (current on-chain counter + 1). |
| `data.item.fee` | object | yes | The estimated transaction fee. |
| `data.item.fee.amount` | string | yes | The fee amount, in the base denomination. |
| `data.item.fee.unit` | string | yes | The fee denomination (mutez). |
| `data.item.gasLimit` | string | yes | The suggested gas limit. |
| `data.item.storageLimit` | string | yes | The suggested storage limit. |
| `data.item.forgedOperation` | string | yes | The forged UNSIGNED operation bytes (hex), ready for the signer. |
| `data.item.revealRequired` | boolean | yes | True when a reveal operation was prepended (the source was unrevealed). |
| `data.item.contract` | string | yes | The token contract address (KT1) the transfer targets. |
