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

# Update Profile

> Update an existing patient profile

Update one or more fields on an existing patient profile. You only need to include the fields you want to change — all body parameters are optional.

## Request

### Path parameters

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

### Body parameters

<ParamField body="email" type="string">
  New email address for the profile.
</ParamField>

<ParamField body="password" type="string">
  New password. Must be between 8 and 128 characters.
</ParamField>

<ParamField body="first_name" type="string">
  New first name. Must use latin characters, between 1 and 100 characters.
</ParamField>

<ParamField body="last_name" type="string">
  New last name. Must use latin characters, between 1 and 100 characters.
</ParamField>

<ParamField body="phone" type="string">
  New phone number in E.164 format (e.g., `+14155552671`).
</ParamField>

<ParamField body="sex" type="integer">
  New biological sex value per ISO/IEC 5218 (`0` = unknown, `1` = male, `2` = female).
</ParamField>

<ParamField body="date_of_birth" type="string">
  New date of birth in `YYYY-MM-DD` format.
</ParamField>

<ParamField body="height" type="number">
  New height in centimeters.
</ParamField>

<ParamField body="weight" type="number">
  New weight in kilograms.
</ParamField>

<ParamField body="language" type="string">
  New preferred language. Accepted values: `en`, `de`, `fi`.
</ParamField>

<ParamField body="transactional_emails_enabled" type="boolean">
  Whether this profile should receive transactional (programmatic) emails — appointment
  confirmations, result-ready notices, etc. Overrides the profile group default. Distinct from
  marketing opt-in. Omit to use the default.
</ParamField>

## Response

On success, the API returns `200 OK` with the full updated profile.

<ResponseField name="id" type="string" required>
  Unique profile identifier (UUID).
</ResponseField>

<ResponseField name="handle" type="string">
  Profile handle or username. May be `null`.
</ResponseField>

<ResponseField name="first_name" type="string">
  First name. May be `null`.
</ResponseField>

<ResponseField name="last_name" type="string">
  Last name. May be `null`.
</ResponseField>

<ResponseField name="email" type="string">
  Email address. May be `null`.
</ResponseField>

<ResponseField name="phone" type="string">
  Phone number in E.164 format. May be `null`.
</ResponseField>

<ResponseField name="sex" type="integer">
  Biological sex per ISO/IEC 5218 (`0` = unknown, `1` = male, `2` = female). May be `null`.
</ResponseField>

<ResponseField name="date_of_birth" type="string">
  Date of birth in `YYYY-MM-DD` format. May be `null`.
</ResponseField>

<ResponseField name="height" type="number">
  Height in centimeters. May be `null`.
</ResponseField>

<ResponseField name="weight" type="number">
  Weight in kilograms. May be `null`.
</ResponseField>

<ResponseField name="language" type="string">
  Preferred language (`en`, `de`, or `fi`).
</ResponseField>

<ResponseField name="transactional_emails_enabled" type="boolean">
  Whether this profile receives transactional (programmatic) emails. `null` when never set.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of when the profile was created.
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp of the last update. May be `null`.
</ResponseField>

## Error responses

| Status | Description                                                                                                    |
| ------ | -------------------------------------------------------------------------------------------------------------- |
| `400`  | Validation error — one or more fields failed validation.                                                       |
| `403`  | Forbidden — your API key does not have access to this operation or the profile is outside your access context. |
| `404`  | Profile not found.                                                                                             |
| `500`  | Internal server error.                                                                                         |

<RequestExample>
  ```bash cURL theme={null}
  curl --request PATCH \
    --url https://anivahealth.com/api/v1/profiles/a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d \
    --header 'x-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "phone": "+4917612345678",
      "language": "en"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
    "handle": null,
    "first_name": "Maria",
    "last_name": "Schmidt",
    "email": "maria.schmidt@example.com",
    "phone": "+4917612345678",
    "sex": 2,
    "date_of_birth": "1985-03-22",
    "height": 168,
    "weight": 65,
    "language": "en",
    "transactional_emails_enabled": true,
    "created_at": "2026-04-01T09:14:32Z",
    "updated_at": "2026-04-01T14:22:11Z"
  }
  ```

  ```json 400 theme={null}
  {
    "error": "phone must be a valid E.164 phone number"
  }
  ```

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