{
  "openapi": "3.1.1",
  "info": {
    "title": "Bioprints API",
    "description": "Palm enrollment, identification and verification for one tenant.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.bioprints.io",
      "description": "Production; a test tenant's key works here too"
    }
  ],
  "paths": {
    "/palm/v1/openapi.json": {
      "get": {
        "tags": [
          "Contract"
        ],
        "summary": "Returns this OpenAPI document.",
        "description": "Served without a key, so you can generate a client from it.",
        "operationId": "getOpenApiDocument",
        "responses": {
          "200": {
            "description": "The OpenAPI document"
          }
        }
      }
    },
    "/palm/v1/people/{subjectReference}/hands": {
      "post": {
        "tags": [
          "Palms"
        ],
        "summary": "Enrolls one or both hands of a person.",
        "description": "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.",
        "operationId": "enrollHands",
        "parameters": [
          {
            "name": "subjectReference",
            "in": "path",
            "description": "Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "The caller's own name for this request: printable ASCII with no spaces. Sent again with the same request, it replays the first success.",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "pattern": "^[\\x21-\\x7E]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "metadata"
                ],
                "type": "object",
                "properties": {
                  "metadata": {
                    "description": "The call's fields, as a JSON part with `Content-Type: application/json`.",
                    "$ref": "#/components/schemas/EnrollMetadata"
                  },
                  "left_rgb": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  },
                  "left_ir": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  },
                  "right_rgb": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  },
                  "right_ir": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "metadata": {
                  "contentType": "application/json"
                },
                "left_rgb": {
                  "contentType": "image/jpeg, image/png"
                },
                "left_ir": {
                  "contentType": "image/jpeg, image/png"
                },
                "right_rgb": {
                  "contentType": "image/jpeg, image/png"
                },
                "right_ir": {
                  "contentType": "image/jpeg, image/png"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Enrolled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.\n- `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.\n- `idempotency_key_missing`: No `Idempotency-Key` header was sent.\n- `idempotency_key_invalid`: The `Idempotency-Key` is not printable ASCII, holds a space, or is over 200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `sensor_not_allowed`: `sensorSerial` is missing, not a reader sold to your tenant, or a frozen reader.\n- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "- `palm_already_enrolled`: The palm already belongs to another live person in your tenant; `existingSubjectReference` names them when Bioprints knows whose palm it is.\n- `hand_already_enrolled`: The person already has this hand enrolled; revoke it first.\n- `gallery_full`: Your tenant's gallery is full.\n- `tenant_busy`: Another enroll or revoke of your tenant held on longer than this call could wait; retry after `Retry-After`.\n- `idempotency_key_in_flight`: A call with the same key and request is still running; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "- `capture_quality_too_low`: The image failed the engine's quality check, or the engine could not use it.\n- `idempotency_key_mismatch`: The key was already used with a different body or path.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Your tenant is over its palm calls a second; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "- `engine_busy`: The engine is busy for everyone; retry after `Retry-After`.\n- `engine_unavailable`: The engine did not answer, or Bioprints is not calling it for the moment; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Palms"
        ],
        "summary": "Lists a person's hands.",
        "description": "Returns each hand Bioprints still holds for the person, with its state: `enrolled`, `frozen` or `removing`.",
        "operationId": "listHands",
        "parameters": [
          {
            "name": "subjectReference",
            "in": "path",
            "description": "Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The person's hands",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `subject_not_found`: No live person has this reference.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/people/{subjectReference}:freeze": {
      "post": {
        "tags": [
          "Palms"
        ],
        "summary": "Freezes a person.",
        "description": "Stops every hand of the person being matched, without deleting anything; a hand they enroll while frozen comes in frozen.",
        "operationId": "freezePerson",
        "parameters": [
          {
            "name": "subjectReference",
            "in": "path",
            "description": "Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "The caller's own name for this request: printable ASCII with no spaces. Sent again with the same request, it replays the first success.",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "pattern": "^[\\x21-\\x7E]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The person's hands",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.\n- `idempotency_key_missing`: No `Idempotency-Key` header was sent.\n- `idempotency_key_invalid`: The `Idempotency-Key` is not printable ASCII, holds a space, or is over 200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `subject_not_found`: No live person has this reference.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "- `idempotency_key_in_flight`: A call with the same key and request is still running; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "- `idempotency_key_mismatch`: The key was already used with a different body or path.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/people/{subjectReference}:unfreeze": {
      "post": {
        "tags": [
          "Palms"
        ],
        "summary": "Unfreezes a person.",
        "description": "Undoes a freeze of the person, restoring exactly what was frozen: a hand frozen on its own stays frozen.",
        "operationId": "unfreezePerson",
        "parameters": [
          {
            "name": "subjectReference",
            "in": "path",
            "description": "Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "The caller's own name for this request: printable ASCII with no spaces. Sent again with the same request, it replays the first success.",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "pattern": "^[\\x21-\\x7E]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The person's hands",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.\n- `idempotency_key_missing`: No `Idempotency-Key` header was sent.\n- `idempotency_key_invalid`: The `Idempotency-Key` is not printable ASCII, holds a space, or is over 200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `subject_not_found`: No live person has this reference.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "- `idempotency_key_in_flight`: A call with the same key and request is still running; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "- `idempotency_key_mismatch`: The key was already used with a different body or path.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/people:identify": {
      "post": {
        "tags": [
          "Palms"
        ],
        "summary": "Identifies whose palm a capture is.",
        "description": "Searches your tenant's people for the palm in the capture, on the hand `metadata.hand` names. A frozen person or hand is never matched. A match means the engine's own verdict passed, so you do not compare the scores yourself.",
        "operationId": "identify",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "metadata"
                ],
                "type": "object",
                "properties": {
                  "metadata": {
                    "description": "The call's fields, as a JSON part with `Content-Type: application/json`.",
                    "$ref": "#/components/schemas/IdentifyMetadata"
                  },
                  "left_rgb": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  },
                  "left_ir": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  },
                  "right_rgb": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  },
                  "right_ir": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "metadata": {
                  "contentType": "application/json"
                },
                "left_rgb": {
                  "contentType": "image/jpeg, image/png"
                },
                "left_ir": {
                  "contentType": "image/jpeg, image/png"
                },
                "right_rgb": {
                  "contentType": "image/jpeg, image/png"
                },
                "right_ir": {
                  "contentType": "image/jpeg, image/png"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A match",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentificationResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.\n- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `sensor_not_allowed`: `sensorSerial` is missing, not a reader sold to your tenant, or a frozen reader.\n- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `no_match`: The capture matches nobody in your tenant; `identificationId` names this identification.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "- `capture_quality_too_low`: The image failed the engine's quality check, or the engine could not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Your tenant is over its palm calls a second; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "- `engine_busy`: The engine is busy for everyone; retry after `Retry-After`.\n- `engine_unavailable`: The engine did not answer, or Bioprints is not calling it for the moment; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/people/{subjectReference}:verify": {
      "post": {
        "tags": [
          "Palms"
        ],
        "summary": "Verifies that a capture is a person.",
        "description": "Checks the capture against the person the path names. When it is somebody else, the answer is only `not_verified`: never who it was, and no scores. A frozen hand, or one being removed, also answers `not_verified`.",
        "operationId": "verify",
        "parameters": [
          {
            "name": "subjectReference",
            "in": "path",
            "description": "Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "metadata"
                ],
                "type": "object",
                "properties": {
                  "metadata": {
                    "description": "The call's fields, as a JSON part with `Content-Type: application/json`.",
                    "$ref": "#/components/schemas/VerifyMetadata"
                  },
                  "left_rgb": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  },
                  "left_ir": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  },
                  "right_rgb": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  },
                  "right_ir": {
                    "type": "string",
                    "description": "A 720 × 1024 JPEG or PNG; sent for a hand the call names and only then, or the call is `capture_malformed`",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "metadata": {
                  "contentType": "application/json"
                },
                "left_rgb": {
                  "contentType": "image/jpeg, image/png"
                },
                "left_ir": {
                  "contentType": "image/jpeg, image/png"
                },
                "right_rgb": {
                  "contentType": "image/jpeg, image/png"
                },
                "right_ir": {
                  "contentType": "image/jpeg, image/png"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The capture is that person",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.\n- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `sensor_not_allowed`: `sensorSerial` is missing, not a reader sold to your tenant, or a frozen reader.\n- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `not_verified`: The capture is not that person, or the hand is frozen or being removed; `verificationId` names this verification.\n- `subject_not_found`: No live person has this reference.\n- `hand_not_enrolled`: The person has no enrolled hand of this side.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "- `capture_quality_too_low`: The image failed the engine's quality check, or the engine could not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Your tenant is over its palm calls a second; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "- `engine_busy`: The engine is busy for everyone; retry after `Retry-After`.\n- `engine_unavailable`: The engine did not answer, or Bioprints is not calling it for the moment; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/people/{subjectReference}": {
      "delete": {
        "tags": [
          "Palms"
        ],
        "summary": "Removes a person.",
        "description": "Removes every hand of the person; from the moment of the request none is matched again. The answer is `202` while the engine is still deleting and `200` once it has confirmed, and Bioprints keeps retrying the engine's delete itself, so you do not call again. Once every hand is removed, the reference is free to enroll again, unfrozen.",
        "operationId": "revokePerson",
        "parameters": [
          {
            "name": "subjectReference",
            "in": "path",
            "description": "Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "The caller's own name for this request: printable ASCII with no spaces. Sent again with the same request, it replays the first success.",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "pattern": "^[\\x21-\\x7E]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removed, confirmed by the engine",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "202": {
            "description": "Removing; never matched again from now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.\n- `idempotency_key_missing`: No `Idempotency-Key` header was sent.\n- `idempotency_key_invalid`: The `Idempotency-Key` is not printable ASCII, holds a space, or is over 200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `subject_not_found`: No live person has this reference.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "- `tenant_busy`: Another enroll or revoke of your tenant held on longer than this call could wait; retry after `Retry-After`.\n- `idempotency_key_in_flight`: A call with the same key and request is still running; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "- `idempotency_key_mismatch`: The key was already used with a different body or path.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/people/{subjectReference}/hands/{hand}": {
      "delete": {
        "tags": [
          "Palms"
        ],
        "summary": "Removes one of a person's hands.",
        "description": "Removes the hand the path names; from the moment of the request it is never matched again. The answer is `202` while the engine is still deleting and `200` once it has confirmed. Revoking a hand already being removed answers as the first time.",
        "operationId": "revokeHand",
        "parameters": [
          {
            "name": "subjectReference",
            "in": "path",
            "description": "Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hand",
            "in": "path",
            "description": "The hand: `left` or `right`.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Hand"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "The caller's own name for this request: printable ASCII with no spaces. Sent again with the same request, it replays the first success.",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "pattern": "^[\\x21-\\x7E]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Removed, confirmed by the engine",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "202": {
            "description": "Removing; never matched again from now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.\n- `idempotency_key_missing`: No `Idempotency-Key` header was sent.\n- `idempotency_key_invalid`: The `Idempotency-Key` is not printable ASCII, holds a space, or is over 200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `subject_not_found`: No live person has this reference.\n- `hand_not_enrolled`: The person has no enrolled hand of this side.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "- `tenant_busy`: Another enroll or revoke of your tenant held on longer than this call could wait; retry after `Retry-After`.\n- `idempotency_key_in_flight`: A call with the same key and request is still running; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "- `idempotency_key_mismatch`: The key was already used with a different body or path.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/people/{subjectReference}/hands/{hand}:freeze": {
      "post": {
        "tags": [
          "Palms"
        ],
        "summary": "Freezes one of a person's hands.",
        "description": "Stops the hand the path names being matched, without deleting anything. Freezing a frozen hand answers as the first time; a hand being removed stays `removing`.",
        "operationId": "freezeHand",
        "parameters": [
          {
            "name": "subjectReference",
            "in": "path",
            "description": "Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hand",
            "in": "path",
            "description": "The hand: `left` or `right`.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Hand"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "The caller's own name for this request: printable ASCII with no spaces. Sent again with the same request, it replays the first success.",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "pattern": "^[\\x21-\\x7E]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The person's hands",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.\n- `idempotency_key_missing`: No `Idempotency-Key` header was sent.\n- `idempotency_key_invalid`: The `Idempotency-Key` is not printable ASCII, holds a space, or is over 200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `subject_not_found`: No live person has this reference.\n- `hand_not_enrolled`: The person has no enrolled hand of this side.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "- `idempotency_key_in_flight`: A call with the same key and request is still running; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "- `idempotency_key_mismatch`: The key was already used with a different body or path.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/people/{subjectReference}/hands/{hand}:unfreeze": {
      "post": {
        "tags": [
          "Palms"
        ],
        "summary": "Unfreezes one of a person's hands.",
        "description": "Undoes a freeze of the hand the path names; the hand stays frozen while the person is. Unfreezing a hand that is not frozen answers as the first time.",
        "operationId": "unfreezeHand",
        "parameters": [
          {
            "name": "subjectReference",
            "in": "path",
            "description": "Your reference for the person: 1 to 64 characters with no `/`, not `.` or `..`, matched exactly, case included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hand",
            "in": "path",
            "description": "The hand: `left` or `right`.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Hand"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "The caller's own name for this request: printable ASCII with no spaces. Sent again with the same request, it replays the first success.",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "pattern": "^[\\x21-\\x7E]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The person's hands",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.\n- `idempotency_key_missing`: No `Idempotency-Key` header was sent.\n- `idempotency_key_invalid`: The `Idempotency-Key` is not printable ASCII, holds a space, or is over 200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `subject_not_found`: No live person has this reference.\n- `hand_not_enrolled`: The person has no enrolled hand of this side.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "- `idempotency_key_in_flight`: A call with the same key and request is still running; retry after `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before trying again",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "- `idempotency_key_mismatch`: The key was already used with a different body or path.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/readers": {
      "post": {
        "tags": [
          "Readers"
        ],
        "summary": "Adds a sold reader to your tenant.",
        "description": "Takes a registry key, never a tenant key. Answers `201` with the reader added, or `200` with the reader as it stands when it is already on your tenant; a frozen reader stays frozen. It is safe to repeat as it is, so it takes no `Idempotency-Key`.",
        "operationId": "addReader",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PalmReaderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Already on this tenant; a frozen reader stays frozen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryPalmReaderResponse"
                }
              }
            }
          },
          "201": {
            "description": "Added",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryPalmReaderResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "- `reader_unavailable`: The serial belongs to another tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "registryKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/readers/{serial}:freeze": {
      "post": {
        "tags": [
          "Readers"
        ],
        "summary": "Freezes a reader taken back.",
        "description": "Takes a registry key. A capture taken on a frozen reader is refused with `sensor_not_allowed`. Only Bioprints operations unfreeze or move a reader.",
        "operationId": "freezeReader",
        "parameters": [
          {
            "name": "serial",
            "in": "path",
            "description": "The reader's serial.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Frozen",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryPalmReaderResponse"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `reader_not_found`: The serial is not a reader on your tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "registryKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/readers/{serial}": {
      "delete": {
        "tags": [
          "Readers"
        ],
        "summary": "Deletes a reader from your tenant.",
        "description": "Takes a registry key. From then on a capture taken on the reader is refused with `sensor_not_allowed`, and its serial is free to be added again, by any tenant. Deleting it again answers `reader_not_found`, so it takes no `Idempotency-Key`.",
        "operationId": "deleteReader",
        "parameters": [
          {
            "name": "serial",
            "in": "path",
            "description": "The reader's serial.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "- `reader_not_found`: The serial is not a reader on your tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "registryKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/deletions": {
      "get": {
        "tags": [
          "Tenant"
        ],
        "summary": "Lists the hands removed from your tenant.",
        "description": "Your evidence that a deletion request was carried out: every hand removed from your tenant, newest first, 50 a page. Pass the page's `next` back as `after` for the following page.",
        "operationId": "listDeletions",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "description": "The `next` value of the previous page; leave it out for the first page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the deletion log",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionPageResponse"
                }
              }
            }
          },
          "400": {
            "description": "- `request_invalid`: The body cannot be read, a required field is missing or `null`, or a value is not one this call takes.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    },
    "/palm/v1/status": {
      "get": {
        "tags": [
          "Tenant"
        ],
        "summary": "Returns your tenant's view of Bioprints.",
        "description": "Health, limits and this month's usage, for your tenant alone. It is never held to your rate of palm calls.",
        "operationId": "getStatus",
        "responses": {
          "200": {
            "description": "Health, limits and this month's usage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          },
          "401": {
            "description": "- `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.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "- `tenant_suspended`: The key is valid, and Bioprints has suspended its tenant.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "tenantKey": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DeletionPageResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeletionResponse"
            },
            "description": "The removed hands on this page, newest first, at most 50."
          },
          "next": {
            "type": [
              "null",
              "string"
            ],
            "description": "The value to pass as `after` for the following page; `null` on the last page."
          }
        },
        "additionalProperties": false,
        "example": {
          "items": [
            {
              "subjectReference": "member-4821",
              "hand": "left",
              "requestedAt": "2026-11-03T10:00:00+00:00",
              "confirmedAt": "2026-11-03T10:00:02+00:00",
              "requestedBy": "clientKey",
              "requestedByKeyId": "0193a1c4e5f67a8b9c0d1e2f3a4b5c6d"
            }
          ],
          "next": null
        }
      },
      "DeletionRequester": {
        "enum": [
          "clientKey",
          "operator"
        ],
        "type": "string"
      },
      "DeletionResponse": {
        "required": [
          "hand",
          "requestedAt",
          "requestedBy",
          "subjectReference"
        ],
        "type": "object",
        "properties": {
          "subjectReference": {
            "type": "string",
            "description": "Your reference for the person the hand belonged to."
          },
          "hand": {
            "description": "The hand removed.",
            "$ref": "#/components/schemas/Hand"
          },
          "requestedAt": {
            "type": "string",
            "description": "When the removal was asked for, in UTC.",
            "format": "date-time"
          },
          "confirmedAt": {
            "type": [
              "null",
              "string"
            ],
            "description": "When the engine confirmed the removal, in UTC; `null` while it has not.",
            "format": "date-time"
          },
          "requestedBy": {
            "description": "Who asked: `clientKey` for a revoke one of your keys sent, or `operator` when Bioprints removed the hand itself, as it does when your tenant leaves.",
            "$ref": "#/components/schemas/DeletionRequester"
          },
          "requestedByKeyId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The id of the key that sent the revoke; `null` when `requestedBy` is `operator`."
          }
        },
        "additionalProperties": false
      },
      "EngineStatus": {
        "enum": [
          "up",
          "down"
        ],
        "type": "string"
      },
      "EnrollMetadata": {
        "required": [
          "hands",
          "sensorSerial"
        ],
        "type": "object",
        "properties": {
          "sensorSerial": {
            "minLength": 1,
            "type": "string",
            "description": "The serial of the reader the capture was taken on: one Bioprints sold to your tenant and not frozen."
          },
          "hands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Hand"
            },
            "description": "The hands to enroll, each named once; send two image parts for each."
          }
        },
        "additionalProperties": false,
        "example": {
          "sensorSerial": "VS2405110001",
          "hands": [
            "left",
            "right"
          ]
        }
      },
      "GalleryHealthResponse": {
        "required": [
          "hands",
          "limit"
        ],
        "type": "object",
        "properties": {
          "hands": {
            "type": "integer",
            "description": "The hands your gallery holds, those still being removed included.",
            "format": "int32"
          },
          "limit": {
            "type": "integer",
            "description": "The most hands your gallery may hold; an enroll past it is refused with `gallery_full`.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Hand": {
        "enum": [
          "left",
          "right"
        ],
        "type": "string"
      },
      "HandState": {
        "enum": [
          "enrolled",
          "frozen",
          "removing",
          "removed"
        ],
        "type": "string"
      },
      "HealthResponse": {
        "required": [
          "engine",
          "gallery",
          "rate",
          "status",
          "usage"
        ],
        "type": "object",
        "properties": {
          "status": {
            "description": "`up`, or `degraded` while the engine is `down`.",
            "$ref": "#/components/schemas/HealthStatus"
          },
          "engine": {
            "description": "`up` while the engine answers at all, busy included, or `down`; asked at most once every ten seconds.",
            "$ref": "#/components/schemas/EngineStatus"
          },
          "gallery": {
            "description": "How many hands your gallery holds, and its limit.",
            "$ref": "#/components/schemas/GalleryHealthResponse"
          },
          "rate": {
            "description": "Your tenant's rate of palm calls.",
            "$ref": "#/components/schemas/PalmCallRateResponse"
          },
          "usage": {
            "description": "Your tenant's calls in the month now running, in UTC.",
            "$ref": "#/components/schemas/UsageResponse"
          }
        },
        "additionalProperties": false,
        "example": {
          "status": "up",
          "engine": "up",
          "gallery": {
            "hands": 1840,
            "limit": 10000
          },
          "rate": {
            "palmCallsPerSecond": 10
          },
          "usage": {
            "month": "2026-11",
            "enrolls": 212,
            "identifies": 9830,
            "verifies": 41,
            "activeHands": 1840
          }
        }
      },
      "HealthStatus": {
        "enum": [
          "up",
          "degraded"
        ],
        "type": "string"
      },
      "IdentificationResponse": {
        "required": [
          "identificationId",
          "match"
        ],
        "type": "object",
        "properties": {
          "identificationId": {
            "type": "string",
            "description": "Bioprints' id for this identification.",
            "format": "uuid"
          },
          "match": {
            "description": "Whose palm the capture is.",
            "$ref": "#/components/schemas/PalmMatchResponse"
          }
        },
        "additionalProperties": false,
        "example": {
          "identificationId": "019a4f2e-6f3c-7b8d-9a1e-2c4f5e6a7b8c",
          "match": {
            "subjectReference": "member-4821",
            "hand": "left",
            "scores": [
              0.98,
              0.97,
              0.99,
              0.96,
              0.95,
              0.97,
              0.98,
              0.99,
              0.96,
              0.97
            ],
            "thresholds": [
              0.729,
              0.756,
              0.729,
              0.76,
              0.7336,
              0.739,
              0.7579,
              0.75,
              0.72,
              0.7312
            ]
          }
        }
      },
      "IdentifyMetadata": {
        "required": [
          "hand",
          "sensorSerial"
        ],
        "type": "object",
        "properties": {
          "hand": {
            "description": "The hand the capture is of; send its two image parts.",
            "$ref": "#/components/schemas/Hand"
          },
          "sensorSerial": {
            "minLength": 1,
            "type": "string",
            "description": "The serial of the reader the capture was taken on: one Bioprints sold to your tenant and not frozen."
          }
        },
        "additionalProperties": false,
        "example": {
          "hand": "left",
          "sensorSerial": "VS2405110001"
        }
      },
      "PalmCallRateResponse": {
        "required": [
          "palmCallsPerSecond"
        ],
        "type": "object",
        "properties": {
          "palmCallsPerSecond": {
            "type": "integer",
            "description": "The enrolls, identifies and verifies your tenant may make a second; an enroll counts once for each hand it searches and once for each it adds.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PalmMatchResponse": {
        "required": [
          "hand",
          "scores",
          "subjectReference",
          "thresholds"
        ],
        "type": "object",
        "properties": {
          "subjectReference": {
            "type": "string",
            "description": "Your reference for the person the palm belongs to."
          },
          "hand": {
            "description": "The hand matched.",
            "$ref": "#/components/schemas/Hand"
          },
          "scores": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            },
            "description": "The engine's ten scores, in its fixed order."
          },
          "thresholds": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            },
            "description": "The engine's ten thresholds, in the same order as `scores`; shared by every tenant."
          }
        },
        "additionalProperties": false
      },
      "PalmReaderRequest": {
        "required": [
          "serial"
        ],
        "type": "object",
        "properties": {
          "serial": {
            "minLength": 1,
            "type": "string",
            "description": "The reader's serial: 1 to 100 characters, not `.` or `..`, with no space at either end and no control character, comma, double quote or slash."
          }
        },
        "additionalProperties": false,
        "example": {
          "serial": "VS2405110001"
        }
      },
      "PalmReaderState": {
        "enum": [
          "active",
          "frozen"
        ],
        "type": "string"
      },
      "ProblemCode": {
        "enum": [
          "capture_malformed",
          "capture_quality_too_low",
          "engine_busy",
          "engine_unavailable",
          "gallery_full",
          "hand_already_enrolled",
          "hand_not_enrolled",
          "idempotency_key_in_flight",
          "idempotency_key_invalid",
          "idempotency_key_mismatch",
          "idempotency_key_missing",
          "key_invalid",
          "no_match",
          "not_verified",
          "palm_already_enrolled",
          "rate_limited",
          "reader_not_found",
          "reader_unavailable",
          "request_invalid",
          "sensor_not_allowed",
          "subject_not_found",
          "tenant_busy",
          "tenant_suspended"
        ],
        "type": "string",
        "description": "What was refused, for software to branch on"
      },
      "ProblemDetails": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ],
            "description": "A URI reference naming the kind of problem, as RFC 9457 defines it."
          },
          "title": {
            "type": [
              "null",
              "string"
            ],
            "description": "Always `Request refused`; the reason is in `code`."
          },
          "status": {
            "type": [
              "null",
              "integer"
            ],
            "description": "The HTTP status, repeated.",
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ],
            "description": "Text for a person reading it, when there is any."
          },
          "instance": {
            "type": [
              "null",
              "string"
            ],
            "description": "A URI reference naming this occurrence, as RFC 9457 defines it, when there is one."
          },
          "code": {
            "description": "The machine-readable reason; branch on it, never on the text.",
            "$ref": "#/components/schemas/ProblemCode"
          }
        },
        "additionalProperties": { }
      },
      "RegistryPalmReaderResponse": {
        "required": [
          "serial",
          "state"
        ],
        "type": "object",
        "properties": {
          "serial": {
            "type": "string",
            "description": "The reader's serial."
          },
          "state": {
            "description": "`active`, or `frozen` once taken back; only Bioprints operations unfreeze a reader.",
            "$ref": "#/components/schemas/PalmReaderState"
          }
        },
        "additionalProperties": false,
        "example": {
          "serial": "VS2405110001",
          "state": "active"
        }
      },
      "SubjectHandResponse": {
        "required": [
          "enrolledAt",
          "hand",
          "state"
        ],
        "type": "object",
        "properties": {
          "hand": {
            "description": "Which hand this is.",
            "$ref": "#/components/schemas/Hand"
          },
          "state": {
            "description": "`enrolled`, `frozen` or `removing`; a revoke's answer also shows `removed`.",
            "$ref": "#/components/schemas/HandState"
          },
          "enrolledAt": {
            "type": "string",
            "description": "When the hand was enrolled, in UTC.",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SubjectResponse": {
        "required": [
          "hands",
          "subjectReference"
        ],
        "type": "object",
        "properties": {
          "subjectReference": {
            "type": "string",
            "description": "Your reference for the person."
          },
          "hands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectHandResponse"
            },
            "description": "The person's hands; a revoke's answer lists the hands that call removes."
          }
        },
        "additionalProperties": false,
        "example": {
          "subjectReference": "member-4821",
          "hands": [
            {
              "hand": "left",
              "state": "enrolled",
              "enrolledAt": "2026-11-02T09:14:03+00:00"
            },
            {
              "hand": "right",
              "state": "enrolled",
              "enrolledAt": "2026-11-02T09:14:03+00:00"
            }
          ]
        }
      },
      "UsageResponse": {
        "required": [
          "enrolls",
          "identifies",
          "month",
          "verifies"
        ],
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "The month counted, as `yyyy-MM`, in UTC."
          },
          "enrolls": {
            "type": "integer",
            "description": "The enrolls that succeeded in the month.",
            "format": "int32"
          },
          "identifies": {
            "type": "integer",
            "description": "The identifies that reached a verdict in the month, `no_match` included.",
            "format": "int32"
          },
          "verifies": {
            "type": "integer",
            "description": "The verifies that reached a verdict in the month, `not_verified` included.",
            "format": "int32"
          },
          "activeHands": {
            "type": [
              "null",
              "integer"
            ],
            "description": "The hands live in your gallery now; `null` for any month but the one running.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "VerificationResponse": {
        "required": [
          "scores",
          "thresholds",
          "verificationId"
        ],
        "type": "object",
        "properties": {
          "verificationId": {
            "type": "string",
            "description": "Bioprints' id for this verification.",
            "format": "uuid"
          },
          "scores": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            },
            "description": "The engine's ten scores, in its fixed order."
          },
          "thresholds": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "double"
            },
            "description": "The engine's ten thresholds, in the same order as `scores`; shared by every tenant."
          }
        },
        "additionalProperties": false,
        "example": {
          "verificationId": "019a4f2f-0a1b-7c2d-8e3f-4a5b6c7d8e9f",
          "scores": [
            0.98,
            0.97,
            0.99,
            0.96,
            0.95,
            0.97,
            0.98,
            0.99,
            0.96,
            0.97
          ],
          "thresholds": [
            0.729,
            0.756,
            0.729,
            0.76,
            0.7336,
            0.739,
            0.7579,
            0.75,
            0.72,
            0.7312
          ]
        }
      },
      "VerifyMetadata": {
        "required": [
          "hand",
          "sensorSerial"
        ],
        "type": "object",
        "properties": {
          "hand": {
            "description": "The hand the capture is of; send its two image parts.",
            "$ref": "#/components/schemas/Hand"
          },
          "sensorSerial": {
            "minLength": 1,
            "type": "string",
            "description": "The serial of the reader the capture was taken on: one Bioprints sold to your tenant and not frozen."
          }
        },
        "additionalProperties": false,
        "example": {
          "hand": "left",
          "sensorSerial": "VS2405110001"
        }
      }
    },
    "securitySchemes": {
      "tenantKey": {
        "type": "http",
        "description": "`bpk_<key id>_<secret>`, issued for one client on one tenant",
        "scheme": "bearer"
      },
      "registryKey": {
        "type": "http",
        "description": "A key that can only add, freeze and delete one tenant's readers",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Contract"
    },
    {
      "name": "Palms"
    },
    {
      "name": "Readers"
    },
    {
      "name": "Tenant"
    }
  ]
}
