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

# session.transfers.create

> Moves a unit from its current owner to a new owner, authorized by the tap session token. Returns a transfer payload that the unit's current owner submits to complete the transfer. Poll GET /v1/units/{unit_id}/transfers/{transfer_id} until status is `confirmed`. Send an `Idempotency-Key` header to make a retry safe: the same key replays the original response instead of preparing a second transfer.

```ts theme={null}
create(body: CreateTransferRequest, options?: IdempotentRequestOptions): Promise<Transfer>
```

|                 |                                                                                  |
| --------------- | -------------------------------------------------------------------------------- |
| Endpoint        | [`POST /v1/units/{unit_id}/transfers`](/api-reference/transfers/transfer-a-unit) |
| Credential      | Session token (`end_sess_...`)                                                   |
| Retry class     | `keyed`                                                                          |
| Idempotency key | Accepted                                                                         |

Carries an idempotency key. Retried on network failure, timeout, `429`, and `409 idempotency.in_progress` - never on a `5xx`.

## Example

```ts theme={null}
const result = await session.transfers.create({
  to: "0x1111111111111111111111111111111111111111",
});
```

## Parameters

<ParamField body="unit_id" type="string" required />

<ParamField body="to" type="string" required>
  Address that will receive the unit.
</ParamField>

## Returns

`201` - `Transfer`.

<ResponseField name="id" type="string" required />

<ResponseField name="unit_id" type="string" required />

<ResponseField name="to" type="string" required />

<ResponseField name="from" type="string" required />

<ResponseField name="status" type="'prepared' | 'confirmed' | 'expired' | 'failed'" required />

<ResponseField name="transaction" type="object | null">
  Payload the unit's current owner submits to complete the transfer. Returned when the transfer is created.
</ResponseField>

<ResponseField name="created_at" type="string" required />

## Errors

Branch on `error.code`, never on the HTTP status - several codes share one.

| Code                               | HTTP | Retry             |
| ---------------------------------- | ---- | ----------------- |
| `auth.forbidden`                   | 403  | Do not retry      |
| `auth.unauthorized`                | 401  | Do not retry      |
| `collection.not_active`            | 409  | Wait, then retry  |
| `idempotency.in_progress`          | 409  | Safe to retry     |
| `idempotency.key_conflict`         | 409  | Do not retry      |
| `internal.error`                   | 500  | Safe to retry     |
| `rate_limit.exceeded`              | 429  | Safe to retry     |
| `session_token.invalid_or_expired` | 401  | Do not retry      |
| `session_token.wrong_chip`         | 403  | Do not retry      |
| `transfer.already_to_recipient`    | 409  | Do not retry      |
| `transfer.in_progress`             | 409  | Poll the resource |
| `transfer.owner_unknown`           | 409  | Wait, then retry  |
| `unit.not_found`                   | 404  | Do not retry      |
| `unit.not_minted`                  | 409  | Poll the resource |
| `validation.failed`                | 400  | Do not retry      |

See [Errors and retries](/sdks/core/errors-and-retries) for the error types and how to narrow them.
