> ## 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.claims.create

> Hands a unit to a recipient address, authorized by the tap session token. `execution:"endstate_relay"` submits the claim for you; `execution:"client_broadcast"` returns a claim payload for you to submit. Poll GET /v1/units/{unit_id}/claims/{claim_id} for status. Send an `Idempotency-Key` header to make a retry safe: the same key replays the original response instead of creating a second claim.

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

|                 |                                                                         |
| --------------- | ----------------------------------------------------------------------- |
| Endpoint        | [`POST /v1/units/{unit_id}/claims`](/api-reference/claims/claim-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.claims.create({
  to: "0x1111111111111111111111111111111111111111",
});
```

## Parameters

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

<ParamField body="to" type="string" required>
  Recipient address.
</ParamField>

<ParamField body="execution" type="'endstate_relay' | 'client_broadcast'">
  `endstate_relay` submits the claim for you. `client_broadcast` returns a claim payload for you to submit.
</ParamField>

## Returns

`201` - `Claim`.

<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="'claiming' | 'claimed' | 'expired' | 'failed'" required />

<ResponseField name="submission" type="object | null" />

<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      |
| `claim.already_to_recipient`       | 409  | Do not retry      |
| `claim.in_progress`                | 409  | Poll the resource |
| `claim.owner_unknown`              | 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      |
| `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.
