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

# Profiles

> Understand how patient profiles work in the Aniva API

A profile is a record representing a patient or user in the Aniva system. Every appointment, lab order, and result is associated with a profile.

## Profile groups

When you create a profile, you assign it to a **profile group** using the `profile_group` parameter. A profile group organizes profiles under your partner account, scoping them to a specific program or integration.

The `profile_group` field accepts either the group's immutable UUID or its human-readable slug. The UUID is the durable reference — it never changes and survives slug renames. The slug is intended for readable URLs and partner integrations.

A `profile_group` value (UUID or slug) is required at creation. The legacy `profile_group_slug` field remains accepted as a deprecated alias.

## Fields

<ResponseField name="id" type="string" required>
  UUID auto-generated by Aniva. Use this to reference the profile in other API calls.
</ResponseField>

<ResponseField name="handle" type="string">
  An optional username or handle for the profile. May be null.
</ResponseField>

<ResponseField name="first_name" type="string">
  Patient's first name. Latin characters only, 1–100 characters. Required at creation.
</ResponseField>

<ResponseField name="last_name" type="string">
  Patient's last name. Latin characters only, 1–100 characters. May be null.
</ResponseField>

<ResponseField name="email" type="string">
  Patient's email address. If you do not provide one at creation, Aniva auto-generates a placeholder
  email.
</ResponseField>

<ResponseField name="phone" type="string">
  Phone number in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (e.g., `+14155552671`). May
  be null.
</ResponseField>

<ResponseField name="sex" type="integer">
  Biological sex per [ISO/IEC 5218](https://www.iso.org/standard/36266.html): `0` = unknown, `1` =
  male, `2` = female. Required at creation.
</ResponseField>

<ResponseField name="date_of_birth" type="string">
  Date of birth in `YYYY-MM-DD` format. Must be a date in the past. Required at creation.
</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 for patient-facing communications. Accepted values: `en`, `de`, `fi`.
</ResponseField>

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

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp of the most recent update. Null if the profile has never been updated.
</ResponseField>

<Note>
  The `first_name`, `sex`, `date_of_birth`, and `profile_group` fields are required when creating a
  profile. All other fields are optional. The legacy `profile_group_slug` field is still accepted as
  a deprecated alias for `profile_group`.
</Note>

## Lifecycle

Profiles follow a simple lifecycle:

1. **Create** — register the profile with required demographic fields and a `profile_group` (UUID
   or slug).
2. **Update** (optional) — add or change fields such as `phone`, `height`, or `weight`.
3. **Associate** — link the profile to appointments using its `id` as the `profile_id`.

## Example profile

```json theme={null}
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "handle": "jdoe42",
  "first_name": "Jane",
  "last_name": "Doe",
  "email": "jane.doe@example.com",
  "phone": "+14155552671",
  "sex": 2,
  "date_of_birth": "1990-06-15",
  "height": 168.0,
  "weight": 65.0,
  "language": "en",
  "created_at": "2026-03-01T09:00:00Z",
  "updated_at": "2026-03-10T14:32:00Z"
}
```
