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

# Add Individual Biomarkers

> Add à-la-carte biomarkers to a home kit order

Add one or more à-la-carte biomarkers to an existing home kit order, outside any pre-built panel. This endpoint is idempotent — already-attached biomarkers are kept.

<Note>Requires `home_kit_orders_manage` scope.</Note>

<Warning>
  Biomarkers can only be added while the kit is `pending`. Once the kit is `dispatched` its
  composition is locked and this call returns `409 Conflict` — the physical kit ships with a fixed
  number of tubes derived from the selected panels and biomarkers, so its contents can't change
  after it has been sent. `activated` and `cancelled` kits are likewise locked. If you need to
  change the tests on a locked kit, reach out to Aniva directly — it's usually still possible, and
  we'll make the change for you to keep the kit's contents consistent.
</Warning>

## Request

### Path parameters

<ParamField path="id" type="string" required>
  Unique identifier (UUID) of the home kit order to add biomarkers to.
</ParamField>

### Body parameters

<ParamField body="biomarker_ids" type="integer[]" required>
  Array of biomarker identifiers to add to the home kit order. Must contain at least one item. Use
  [List Biomarkers](/api/biomarkers/list-biomarkers) to discover biomarker IDs.
</ParamField>

## Response

On success, the API returns `200 OK` confirming the biomarkers have been added.

<ResponseField name="success" type="boolean">
  `true` when the biomarkers have been successfully added to the home kit order.
</ResponseField>

## Error responses

| Status | Description                                                                                                                              |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `400`  | Validation error — e.g., `biomarker_ids` is empty or contains an invalid value.                                                          |
| `403`  | Forbidden — your API key does not have access to this operation.                                                                         |
| `404`  | Home kit order or one or more biomarkers not found.                                                                                      |
| `409`  | Conflict — the kit is `dispatched`, `activated`, or `cancelled`; its panel and biomarker composition is locked and can no longer change. |
| `500`  | Internal server error.                                                                                                                   |

<RequestExample>
  ```bash cURL theme={null}
  curl --request PATCH \
    --url https://anivahealth.com/api/v1/home-kit-orders/d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a/biomarkers \
    --header 'x-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "biomarker_ids": [42, 87]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Biomarker not found"
  }
  ```
</ResponseExample>
