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

# endstate.chips.pair

> Pairs one chip to an item. The tap credential is single-use, so pass an idempotencyKey you control when a retry is possible: core generates one otherwise, and a generated key only dedupes retries within this call.

```ts theme={null}
pair(body: CreateChipRequest, options?: IdempotentRequestOptions): Promise<CreateChipResponse>
```

|                 |                                                      |
| --------------- | ---------------------------------------------------- |
| Endpoint        | [`POST /v1/chips`](/api-reference/chips/pair-a-chip) |
| Credential      | Secret key (`end_sk_...`)                            |
| 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 endstate.chips.pair({
  // see the request schema
});
```

## Returns

`201` - `CreateChipResponse`.

<ResponseField name="chip_id" type="string" required>
  Chip identifier from the tap URL.
</ResponseField>

<ResponseField name="is_test" type="boolean" required />

<ResponseField name="unit" type="object" required>
  Snapshot of the paired unit, including its collection and issuance status. Poll the unit (GET /v1/units/{unit_id}) until `collection.token.status` is `active`. Issuance has no failure status on this surface - if the unit stays `pending` well beyond a few minutes, stop polling and contact support.
</ResponseField>

<ResponseField name="scan_count" type="integer" required />

<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     |
| `chip.already_paired`      | 409  | Do not retry     |
| `chip.invalid_e_value`     | 422  | Do not retry     |
| `chip.not_found`           | 404  | 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    |
| `unit.issuance_pending`    | 409  | Wait, then retry |
| `unit.not_found`           | 404  | Do not retry     |
| `validation.failed`        | 400  | Do not retry     |

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