# Enrolls one or both hands of a person.

`POST /palm/v1/people/{subjectReference}/hands`

Enrolls the hands `metadata.hands` names under your reference for the person; with two hands, both are enrolled or neither is. Bioprints always runs the engine's quality check, and enrolls of one tenant run one at a time, so two enrolls of the same palm can never both succeed. An enroll counts once for each hand it searches and once for each hand it adds, so a two-hand enroll uses four of your palm calls a second.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `Idempotency-Key` | string | yes | The caller's own name for this request: printable ASCII with no spaces. Sent again with the same request, it replays the first success. Length 1–200. |

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `subjectReference` | string | yes | Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included. |

## Request body

`Content-Type: multipart/form-data`

| Field | Type | Required | Description |
|---|---|---|---|
| `metadata` | object | yes | The call's fields, as a JSON part with `Content-Type: application/json`. |
| `metadata.sensorSerial` | string | yes | The serial of the reader the capture was taken on: one Bioprints sold to your tenant and not frozen. Length 1–∞. |
| `metadata.hands` | array of string: `left`, `right` | yes | The hands to enroll, each named once; send two image parts for each. |
| `left_rgb` | string (binary) |  | A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`. |
| `left_ir` | string (binary) |  | A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`. |
| `right_rgb` | string (binary) |  | A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`. |
| `right_ir` | string (binary) |  | A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`. |

## Responses

**201** Enrolled (`application/json`)

| Field | Type | Required | Description |
|---|---|---|---|
| `subjectReference` | string | yes | Your reference for the person. |
| `hands` | array of object | yes | The person's hands; a revoke's answer lists the hands that call removes. |
| `hands[].hand` | string: `left`, `right` | yes | Which hand this is. |
| `hands[].state` | string: `enrolled`, `frozen`, `removing`, `removed` | yes | `enrolled`, `frozen` or `removing`; a revoke's answer also shows `removed`. |
| `hands[].enrolledAt` | string (date-time) | yes | When the hand was enrolled, in UTC. |

**400** - `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.
- `capture_malformed`: A part is missing, a part is for a hand the call does not name, an image is not a 720 × 1024 JPEG or PNG, or the request is over 2 MiB.
- `idempotency_key_missing`: No `Idempotency-Key` header was sent.
- `idempotency_key_invalid`: The `Idempotency-Key` is not printable ASCII, holds a space, or is over 200 characters. (`application/problem+json`)

The error body; see [Error codes](https://docs.bioprints.io/errors.md).

**401** - `key_invalid`: No key, a key Bioprints does not know, a revoked or expired key, or a call from an address the key is not allowed from; every key problem answers this same code. (`application/problem+json`)

The error body; see [Error codes](https://docs.bioprints.io/errors.md).

**403** - `sensor_not_allowed`: `sensorSerial` is missing, not a reader sold to your tenant, or a frozen reader.
- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant. (`application/problem+json`)

The error body; see [Error codes](https://docs.bioprints.io/errors.md).

**409** - `palm_already_enrolled`: The palm already belongs to another live person in your tenant; `existingSubjectReference` names them when Bioprints knows whose palm it is.
- `hand_already_enrolled`: The person already has this hand enrolled; revoke it first.
- `gallery_full`: Your tenant's gallery is full.
- `tenant_busy`: Another enroll or revoke of your tenant held on longer than this call could wait; retry after `Retry-After`.
- `idempotency_key_in_flight`: A call with the same key and request is still running; retry after `Retry-After`. (`application/problem+json`)

Header `Retry-After`: Seconds to wait before trying again

The error body; see [Error codes](https://docs.bioprints.io/errors.md).

**422** - `capture_quality_too_low`: The image failed the engine's quality check, or the engine could not use it.
- `idempotency_key_mismatch`: The key was already used with a different body or path. (`application/problem+json`)

The error body; see [Error codes](https://docs.bioprints.io/errors.md).

**429** - `rate_limited`: Your tenant is over its palm calls a second; retry after `Retry-After`. (`application/problem+json`)

Header `Retry-After`: Seconds to wait before trying again

The error body; see [Error codes](https://docs.bioprints.io/errors.md).

**503** - `engine_busy`: The engine is busy for everyone; retry after `Retry-After`.
- `engine_unavailable`: The engine did not answer, or Bioprints is not calling it for the moment; retry after `Retry-After`. (`application/problem+json`)

Header `Retry-After`: Seconds to wait before trying again

The error body; see [Error codes](https://docs.bioprints.io/errors.md).

Every refusal code is listed in [Error codes](https://docs.bioprints.io/errors.md).

Source: https://docs.bioprints.io/api/enroll-hands
