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

# Remove Individual Biomarkers

> Remove individual biomarkers from an appointment

Remove one or more individual biomarkers from an appointment's à-la-carte set.

The post-removal biomarker set is validated against each lab's closure rules: a removal can
strand the set (e.g. dropping LDL while keeping the LDL/HDL ratio). When it does, the request
returns `400` with structured recovery options and nothing is removed. See [Add Individual
Biomarkers](/api/appointments/add-individual-biomarkers) for the shape of the `validation`
payload.

Every ID in `biomarker_ids` must currently be attached to the appointment — otherwise the request returns `404`.

<Warning>
  Biomarkers cannot be removed after you call [Confirm Blood
  Draw](/api/appointments/confirm-blood-draw).
</Warning>

## Request

### Path parameters

<ParamField path="id" type="string" required>
  Unique identifier (UUID) of the appointment.
</ParamField>

### Body parameters

<ParamField body="biomarker_ids" type="number[]" required>
  Array of biomarker IDs to detach. Must contain at least one item, and every ID must currently be
  on the appointment.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  `true` when the biomarkers have been successfully removed.
</ResponseField>

## Error responses

| Status | Description                                                                                                    |
| ------ | -------------------------------------------------------------------------------------------------------------- |
| `400`  | `biomarker_ids` empty / non-integer, or the post-removal set fails closure validation (`validation.failures`). |
| `403`  | Forbidden — missing scope or appointment outside access context.                                               |
| `404`  | Appointment not found, or one or more biomarkers not associated with the appointment.                          |
| `409`  | Conflict — biomarkers cannot be modified after the blood draw has been confirmed.                              |
| `500`  | Internal server error.                                                                                         |

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url https://anivahealth.com/api/v1/appointments/c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a/biomarkers \
    --header 'x-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "biomarker_ids": [42]
    }'
  ```
</RequestExample>

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

  ```json 404 theme={null}
  {
    "error": "Biomarkers not associated with this appointment: 42"
  }
  ```
</ResponseExample>
